Player state Casting fails on event begin play?
I am trying to get the variable from player state in my multiplayer game at the event begin play but casting fails, And if I try that casting on key event press that time I am able to access the value from player state. I don't know what the hell is happening in this case. Please help me.
asked Mar 04 '15 at 11:13 AM in Blueprint Scripting
The suggestions to use a delay or put the logic into Tick give me the heebie jeebies as a programmer. Instead, my solution for solving the issue where PlayerState was null/unavailable until a few frames after BeginPlay was to put my logic in an overridden version of ACharacter::OnRep_PlayerState(). This gets called as soon as the PlayerState is first assigned, or ever changes.
Follow this question
Once you sign in you will be able to subscribe for any updates here