my button is missing its target when returning to the scene!

In my title scene I have a button to open the menu, on that button I have a click event to open the menu. If I leave that scene and return to it, the target is lost.

How can I recover or keep it?

Edit:

It seems that the problem is that the script is in a Dont destroy on load object.

1 Answer

1

You mean in play mode Right? It happens because don’t destroy script can’t keep reference, if scene switch, you need to assign a Add Listener ftn to your Bt in start.

Next part is, check anchor position, pivot of the button. Some time that goes out of screen because developer anchored it on wrong side.

I hope that helps.