I am doing the following within the Event Graph of a Widget Blueprint.
The cast is failing on my client but not the server.
Anyone have any ideas why?
I am doing the following within the Event Graph of a Widget Blueprint.
The cast is failing on my client but not the server.
Anyone have any ideas why?
When working with UMG, use Get Owning Player instead of Get Player Character[idx=0].
I tried using Get Owning Player but that gives me a warning when trying to cast. Should I be getting the character from the player somehow?
I also tried Get Owning Player Pawn by itself but that gives me the same cast error as the original.
I’m not at my computer right now so I can’t test it myselfe but try "get owning player pawn " instead of get player and use a small delay right after your event execute
Owning player pawn I mean, sry fixed it
There is no such thing as “get owning player character”
As mentioned in my comment to , I tried Get Owning Player Pawn but it still gives the cast error. I will try adding a delay though.
Why do I have to manually put a delay in though? And what if the delay isn’t long enough for some computers? It seems very sloppy. Shouldn’t it just know not to try and cast until after it has gotten the thing to cast?
Yeah the delay was my main thought but if you work in widgets try to use the “get owning” nodes, it’s really handy
well that depends on where you create that widget. i guess it was on begin play on a controller or something like that? simply put you were casting to something that didn’t exists at that moment.
Well there are 3 ways to solve problems like this, from worst case to best: