Branch condition not working correctly in Widget

Inside my widget, I’m trying to check to see if the widget component in my “SaveGameActor” is visible in game, but when testing if this works, nothing happens and I get the “Accessed none trying to read property SaveGame Actor”. Any help on understand whats going wrong?

(My previous question should help understand whats going on)

right click on the SaveGameActor variable and click Find References.

Look for a Set SaveGameActor.

If there is not a set node, that is the problem.

You’ll need to understand referencing:
Referencing Actors | Unreal Engine Documentation

I have it and the errors still pop up

put a print string on the Cast Failed and see if it prints.

Is your player pawn of the class SaveGameActor?

The casting is failing and yes i believe its a pawn.

you are misunderstanding some important details.

you’ll need to understand inheritance and how it is used in unreal.

Here’s a decent video covering the topic:
Unreal Engine - Inheritance Explained - YouTube

and the documentation has much written as well.

It’s too much to explain in a forum post and there is so much written about it already, no sense repeating. But to be able to do anything in unreal, you’ll have to understand this key concept.

Ok so i got an understanding on what i was doing wrong and honestly its ridiculous.

Basically i was working in the UMG that i wanted to check was visibile but the only problem with that is that i was trying to check it from an WidgetComponent. Overall, i had to change the condition to make more since in the pictures below.

image

image

@BIGTIMEMASTER Thank you very much for the help

1 Like