Download

Config UPROPERTY in ULocalPlayer sublcass

Hello,

I am really stuck with this, for some reason I cannot get properties tagged with config to load in my LocalPlayer subclass. I declared it like so:

UCLASS(config=Engine, transient)
class UXXXLocalPlayer : public ULocalPlayer
{
GENERATED_UCLASS_BODY()

public:

UPROPERTY(config)
int32 TestConfigInt;

};

And in DefaultEngine.ini I have:
[Script/XXX.XXXLocalPlayer]
TestConfigInt=23

And I cannot figure out for the life of me why its not loading. I have done basically the exact same thing as a sanity check in my PlayerController class and it worked. Am I missing some knowledge about configs that would prevent them from being loaded, or is there something specific about ULocalPlayer (something in its implementation) that I am missing?

Sorry I know this is a rather simple problem, but believe me I have reached the bang-head-against-monitor stage and would really appreciate some pointers. Thanks!

So, I was missing the forward slash before Script… :o Rather silly typo, I wish there was some kind of log warning. Oh well at least I will know to watch out for that next time…