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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Failed to find any loaded scene named "XXXX"!

Discussion in 'Relay' started by shreyasm023, Nov 25, 2022.

  1. shreyasm023

    shreyasm023

    Joined:
    Jul 10, 2021
    Posts:
    4
    I am trying to connect 2 players together using the relay, the first player joins fine but player 2 gets an error "Failed to find any loaded scene named Game!" I've tried using the relay with NGO as well as UTP but got the same error both times. I am loading the scene by LoadSceneMode.Single
    Code (CSharp):
    1.  
    2.  
    3. if (IsServer && !string.IsNullOrEmpty(m_SceneName))
    4. {
    5.             var status = NetworkManager.SceneManager.LoadScene(m_SceneName, LoadSceneMode.Single);
    6.             if (status != SceneEventProgressStatus.Started)
    7.             {
    8.                 Debug.LogWarning($"Failed to load {m_SceneName} " +
    9.                       $"with a {nameof(SceneEventProgressStatus)}: {status}");
    10.             }    
    11.    
    12. }
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,191
    Is the "Game" scene in the Player Build settings scene list? If not, it needs to be.
     
  3. shreyasm023

    shreyasm023

    Joined:
    Jul 10, 2021
    Posts:
    4
    It is in the build settings!