March 2019
Intermediate to advanced
708 pages
17h 9m
English
Here, UAction::StaticClass() gets you a base UClass * for the UAction object. The first argument to NewObject< > is GetTransientPackage(), which simply retrieves the transient package for the game. A package (UPackage) in UE4 is just a data conglomerate. Here we use the Transient Package to store our heap-allocated data. You could also use UPROPERTY() TSubclassOf<AActor> from Blueprints to select a UClass instance.
The third argument (optional) is a combination of parameters that indicate how UObject is treated by the memory management system.
Read now
Unlock full access