Problem: Cast to from Widget to a Pawn

Hello, i m trying the UMG UI Designer Quick Start Guide from the Documentation.

I m on Part 2 and want castto (myCharacter) . His Name is Test and its a Pawn.

But when i make it how in the Tutorial , i become a Warning in the Hub Blueprint.

help pls, thx

You can only cast to child class of the class you’re trying to cast. In this case Character inherits from Pawn. And Get Player Character returns a Character. You can’t cast a Character to a Pawn. But you could cast a pawn to a character. Try Get Player Pawn or change Test to inherit from Character and not Pawn.

1 Like