0
votes

I have 2 scenes in my game. A main home screen with a single button Start which clicking takes you to the other scene, and a scene with the game.

For some reason, Update() is being called on the 2nd scene even tho it hasn't been loaded yet.

public class StartClick : MonoBehaviour {
    public Button button;

    void Start() {
        button.onClick.AddListener(() => {
           SceneManager.LoadScene(1);
        });
    }
}
1
Can you provide your method of loading scene?Morasiu
Added the methodA-Android UCG
Why is Update() being called on a scene that's not even loaded yetA-Android UCG

1 Answers

0
votes

As you can see in this image, Update is called AFTER input events, so that's why it's called once again (but should be just one more time).

enter image description here