I have a UI widget that will be tracking the in-game position of the sun (bottom left corner).

In-game screenshot featuring sun dial

When I try to get the sun's position, it can't find the sun actor even though (I think) I have a reference to it in the widget blueprint.

enter image description here

SunDial widget blueprint

All I get is a null reference error.

Null reference error for Sun actor screenshot

What am I doing wrong and how do I fix it?

New contributor
bynary is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • \$\begingroup\$ How are you setting sun actor? I cannot see any event called that set the value of the actors. It seems that you didn't executed at begin play and as tick starts the value of SunActor is still null \$\endgroup\$ yesterday
  • \$\begingroup\$ @SimoneLungarella, I'm using the Get All Actors with Tag and setting the tag to "Sun", then using a GET node to select the 0 index and using a Set node to set the actor variable. I currently only have one actor with that tag in my project, so the 0 index should get me the Sun...but it's not. \$\endgroup\$
    – bynary
    16 hours ago


You must log in to answer this question.

Browse other questions tagged .