Hi, im trying to assign player instance for accessing character’s state (health etc.) variable and later on easy for me to retrieve the value in UMG binding functions (playerinstance->health), however the cast is always failed and error shows in log once I quited the play preview.
What you get is PlayerController so from PlayerController you must GetPawn first then cast to MyCharacter
You cannot cast to widgets as of 4.7 unfortunately
this should solve the problem, since playercontroller is differ with character. PlayerController is possessed by a Pawn (parent class of Character)
Yeah i rmb last time i did mark this answer as solved not sure why it got unmarked. Thanks anyway ![]()
