I am trying to change the “hidden” property of an actor in game by pressing a button in the UI. I am using UMG, but i can’t find a way to get the reference to that actor in the Event Graph in order to use the “Set Actor Hidden in Game” node.
The only way that I have found to get the actor’s reference until now is to make a class with this actor and then use a “Get all Actors of Class” node to retrieve all possible references of this class in the map into a matrix an then extract the element at index 0. It seems a quite weird approach of doing what should be a very simple task. Moreover, it worked but stopped working after I reorganized the assets a bit in folders.(¿?)
So, please, can someone give me a clue of how to retrieve the reference of an actor in the level from an UMG UI Event Graph?
Thanks in advance.