March 2019
Intermediate to advanced
708 pages
17h 9m
English
In a globally accessible object (such as your GameMode object), add a TSubclassOf< YourC++ClassName > UPROPERTY() to specify and supply the UCLASS name to your C++ code. To do this with the GameMode, do the following:
#pragma once#include "CoreMinimal.h"#include "GameFramework/GameModeBase.h"#include "UserProfile.h"#include "Chapter_02GameModeBase.generated.h"/** * */UCLASS()class CHAPTER_02_API AChapter_02GameModeBase : public AGameModeBase{ GENERATED_BODY() public: UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = UClassNames ) TSubclassOf<UUserProfile> UPBlueprintClassName; ...Read now
Unlock full access