I have a UI with a cancel button. How do I tell this cancel button to delete an actor inside the scene? Inside the Graph of the UI, I have an “OnClicked” event for this Cancel button. I’ve added a “DestroyActor” and created a Variable Reference to the Actor’s object. Connected this variable to the DestroyActor node. But it doesn’t work when the button is clicked. Any suggestions?
I am suspecting the variable that references the object needs to be a class instead of a reference? But Im not sure how to DestroyActor of all classes.