Character Reference in player controller is null in Packaged game.
It seems I've encountered a problem when packaging my game. Some details before I get to the problem. My character class is a child class of BP_Character that is split into two genders BP_Male and BP_Female. In my character creator I set if the character is male or female and then spawn the child based off that decision. So now you have the background.
In the game world I spawn the character and load it's variables from the character creator. I cast to the parent BP_Character in the Player Controller as seen here.
The problem I'm having is that it works in Standalone mode but does not work in a packaged game. The Character reference is not valid even though it is in the editor.
Would someone know what my problem is?
asked Sep 06 '18 at 09:53 AM in Blueprint Scripting
Well sometimes order of initialization is different in packaged game. Maybe this is the case. You can try to call Delay until GetControlledPawn returns a valid result. Also, try to package your game 'By the book'.
Btw. do you test this in multiplayer?
BP are not cooked by default, you have to use a bp class.
answered Sep 06 '18 at 11:00 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here