Hello World!
My GameMode has UPROPERTY of UObject derived type
UPROPERTY(EditAnywhere, meta = (AllowPrivateAccess = true))
UPlayerManager* PlayerManager;
I init this property in constructor
PlayerManager = CreateDefaultSubobject<UPlayerManager>(TEXT("PlayerManager"));
PlayerManager declared like i show below, and this object has simple TMap with UENUM key and TSubclassOf value
UCLASS(BlueprintType)
class C77_API UPlayerManager : public UObject
UENUM(BlueprintType)
enum class EPlayerType : uint8
{
Play UMETA(DisplayName = "Play"),
Dead UMETA(DisplayName = "Dead"),
First = Play,
Last = Dead
};
UPROPERTY(EditAnywhere, Category = "PlayerManager", meta = (AllowPrivateAccess = true))
TMap<EPlayerType, TSubclassOf<APawn>> PlayerClasses;
So, after i recompile my project and try to edit PlayerManager property in my game mode BP i can’t save them. I tried to press save button inside PlayerManager object editor, and inside GameMode editor, also i tried SaveAll and GameMode blueprint recompilation. But, after i close and open project again, values of PlayerManager field dropped to default.
Why?