Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

SceneManager.LoadSceneAsync Buttons in previous scene are still interactable

Discussion in 'Multiplayer' started by rocksvick, Apr 6, 2018.

  1. rocksvick

    rocksvick

    Joined:
    Sep 9, 2012
    Posts:
    3
    ON UI button i am calling SceneManager.LoadSceneAsync() . Everything goes well but if if click on same button multiple time it tries to load new scene multiple times.
    Is there any way so that old scene become non interactable. As it should not call SceneManager.LoadSceneAsync multiple times.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The whole point of LoadSceneAsync is that it loads the new scene but keeps the existing scene running. So if you are calling LoadSceneAsync from a button you should disable the button yourself after the first press, or otherwise ignore follow up presses of the button.