cast actor`s integer to Widget

hi everyone,

I have a question about how to work normal cast to BP(actor) as cast to pawn?
i try to use Get Owning Player, and it still warning.

thank you!

Hi! if you want know about cast’s please check this link text

and in widget blueprint use GetOwningPlayerPawn() it returns the pawn, but GetOwningPlayer() return the PlayerController that owns that UI

What is that BP_1205_3 you’re casting to?

Is it has something to do with UI and widgets, you have to use Player Controller to reach the UI.

i cast to Blueprint(actor) to show the score.

thanks for the link,
but after i read it ,I think there`s no way to cast to actor.
or maybe i missed something?

I want to cast to actor because I want to see execute line(orange line) when I run the game,
but I can`t see the whole line when I use Character or Pawn.

Maybe you should Get Player Character, not a Pawn?

does the player pawn inherit from the class that your casting to? considering you mentioned actor im guessing that its a basic bp actor in which case its likely that the pawn does not inherit from the actor.

it looks to me like your while issue here is about your trying to get a variable from the player so as to display it in the widget. if thats the case then all you need is a reference to the character or pawn that is the player then it needs to be identified enough so as to get the class variable. one method to do this is to get the player pawn then cast to the class that the pawn is. so if your pawn is of the class bp1206pawn then you would cast to that class. another method to get the reference you need would be to create a variable and set its type to the class your looking to target, then when you create the widget you set the variable.

also what exactly does the warning say?