Home > other >  Novice more scenes from the jump button events of the last scene with no response
Novice more scenes from the jump button events of the last scene with no response

Time:09-27

Have two scenarios A and B, in scene after 1 click of A button on A load scenario B, B after loading scene, the mouse to click the button 2, incident response is still in the scene, A scene B as just A mask layer, how be to return A responsibility excuse me?
Scenario A hanging script, button 1 event
Void Click_Show ()
{
StartCoroutine (Show);
}

IEnumerator Show ()
{
Yield return SceneManager. LoadSceneAsync (" SceneLog, "LoadSceneMode. I.e.);
SceneLog SceneManager. SetActiveScene (SceneManager. GetSceneByName (" "));
}

Scenario B hang up another script, button 2 events
Public void onClick_Pre ()
{
//code

}

CodePudding user response:

You this kind of writing is not jump scene,
Void Click_Show ()
{
SceneLog SceneManager. LoadScene (" ");
}
If not, you write your requirements in the know I'm watching,

CodePudding user response:

Scene jump SceneManager. LoadScene (" scenario name or index "); Write a click event to the button to see if the update () start () or something accidentally call. You can use the debug log test

CodePudding user response:

reference 1/f, it's ok to write notes response:
you this kind of writing is not jump scene,
Void Click_Show ()
{
SceneLog SceneManager. LoadScene (" ");
}
If not, you write your requirements in the know I'm watching,

Jump model with more scene, scene from A to B, B in A, my question is why the mouse incident response or A scene, or click on A scene,

CodePudding user response:

You said, in A, B is added to the scene, and not jump, so two scenarios of the Button click event are useful,

CodePudding user response:

Jump LoadSceneMode. I.e. this way, there is no reaction, B on A response
  • Related