D
D
Dmitry2017-06-15 16:29:41
Unity
Dmitry, 2017-06-15 16:29:41

Why does a click in one scene also work in the next?

Hello colleagues. I understand with Unity3d, makes a 2D game in which you need to click on a button and go to another scene.
In the first scene I do

button.onClick.AddListener(SomeHandler); 
void SomeHandler() { 
    SceneManager.LoadScene ("Result"); return; 
}

At the same time, on the second stage in the same place there is a button that immediately works when entering the stage. How to avoid such behavior?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pparma, 2017-06-18
@Pparma

I doubt that the new scene button works. Check if the handler is added twice to the button of the old scene.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question