March 2019
Intermediate to advanced
708 pages
17h 9m
English
Let's say we are trying to construct an object of a UAction type that itself derives from UObject—for example, the following class:
UCLASS(BlueprintType, Blueprintable, meta=(ShortTooltip="Base class for any Action type") )class CHAPTER_03_API UAction : public UObject{ GENERATED_BODY()public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Properties) FString Text; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Properties) FKey ShortcutKey;};
To construct an instance of the UAction class, we'd do the following:
// Create an objectUAction * action = NewObject<UAction>(GetTransientPackage(), UAction::StaticClass() /* RF_* flags */ );
Read now
Unlock full access