I have a C++ class (PlayerPawn.cpp) that has a private UPROPERTY variable. I then have a blueprint class (BP_PlayerPawn) that is based on PlayerPawn.cpp.
Now, I also have another C++ class (GameModeBase.cpp), from which I’m trying to access the UPROPERTY variable explicitly from BP_PlayerPawn, without instantiating the class.
I’ve tried to do some reserach, but no luck. Any form of help would be greatly appreciated!
If you don’t instantiate the class, that variable will always be the same, why do you want to access it? Just create the same variable in your game mode and use it.
However, your game mode is actually instantiated (at least in standalone or on a server in network modes), so you should be able to access that instance also.
Why you want to do it is a perfectly valid question, there’s not a lot of good use for this sort of thing.