Problem: Players joining different rooms

Hello, I'm running a Fusion script in a shared mode which should allow players to connect to the same room since it has the same name(City), for some reason the players sometimes connecting to different rooms while the script got only one room name, thanks

That's the script:

using System.Collections;

using System.Collections.Generic;

using System.Threading.Tasks;

using System;

using System.Linq;

using UnityEngine;

using UnityEngine.SceneManagement;

using Fusion;

using Fusion.Sockets;



public class Spawner : MonoBehaviour, INetworkRunnerCallbacks

{

    NetworkRunner networkRunner;


    public NetworkPlayer playerPrefab;


    public GameObject loadingScreen;


    public Transform spawnPosition;


    private void Awake()

    {

        networkRunner = GetComponent<NetworkRunner>();

    }


    void Start()

    {

        var clientTask = InitializeNetworkRunner(networkRunner, GameMode.Shared, NetAddress.Any(), SceneManager.GetActiveScene().buildIndex, null);


    }


    protected virtual async Task InitializeNetworkRunner(NetworkRunner runner, GameMode gameMode, NetAddress address, SceneRef scene, Action<NetworkRunner> initialized)

    {

        var sceneObjectProvider = runner.GetComponents(typeof(MonoBehaviour)).OfType<INetworkSceneManager>().FirstOrDefault();


        if(sceneObjectProvider == null)

        {

            sceneObjectProvider = runner.gameObject.AddComponent<NetworkSceneManagerDefault>();

        }

       

        var result = await runner.StartGame(new StartGameArgs

        {

            GameMode = gameMode,

            Address = address,

            Scene = scene,

            SessionName = "City",

            Initialized = initialized,

            SceneManager = sceneObjectProvider

        });


        if (result.Ok)

        {

        Debug.Log("StartedGame");

        }else

        {

        Debug.Log("Reattempting game start");

        var clientTask = InitializeNetworkRunner(networkRunner, GameMode.Shared, NetAddress.Any(), SceneManager.GetActiveScene().buildIndex, null);

        }


        return;

    }


    public void OnConnectedToServer(NetworkRunner runner)

    {

        if(runner.Topology == SimulationConfig.Topologies.Shared)

        {

            Debug.Log("OnConnectedToServer, starting player prefab as local player");


            runner.Spawn(playerPrefab, new Vector3(spawnPosition.transform.position.x, spawnPosition.transform.position.y, spawnPosition.transform.position.z), Quaternion.identity, runner.LocalPlayer);


        }else

        {

            Debug.Log("OnConnectedToServer");


        }


    }


    public void OnPlayerJoined(NetworkRunner runner, PlayerRef player)

    {

        if(runner.IsServer)

        {

            Debug.Log("OnPlayerJoined we are server, Spawning player");

            runner.Spawn(playerPrefab, new Vector3(0, 0, 0), Quaternion.identity, player);


        }else

        {

            Debug.Log("OnPlayerJoined");


        }


        loadingScreen.SetActive(false);


    }


    public void OnDisconnectedFromServer(NetworkRunner runner)

    {

    Debug.Log("OnDisconnectedFromServer");

    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);

    }


    public void OnConnectFailed(NetworkRunner runner, NetAddress remoteAddress, NetConnectFailedReason reason)

    {

    Debug.Log("OnConnectFailed");

    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);

    }


    public void OnHostMigration(NetworkRunner runner, HostMigrationToken hostMigrationToken)

    {

    Debug.Log("OnHostMigration");

    }


    public void OnPlayerLeft(NetworkRunner runner, PlayerRef player)

    {

       

    }


    public void OnInput(NetworkRunner runner, NetworkInput input) {}

    public void OnInputMissing(NetworkRunner runner, PlayerRef player, NetworkInput input) { }

    public void OnShutdown(NetworkRunner runner, ShutdownReason shutdownReason)

    {

    Debug.Log("OnShutdown");

    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);

    }

    public void OnConnectRequest(NetworkRunner runner, NetworkRunnerCallbackArgs.ConnectRequest request, byte[] token) { }

    public void OnUserSimulationMessage(NetworkRunner runner, SimulationMessagePtr message) { }

    public void OnSessionListUpdated(NetworkRunner runner, List<SessionInfo> sessionList) { }

    public void OnCustomAuthenticationResponse(NetworkRunner runner, Dictionary<string, object> data) { }

    public void OnReliableDataReceived(NetworkRunner runner, PlayerRef player, ArraySegment<byte> data) { }

    public void OnSceneLoadDone(NetworkRunner runner) { }

    public void OnSceneLoadStart(NetworkRunner runner) { }



}