public override bool OnRoomServerSceneLoadedForPlayer(NetworkConnection conn, GameObject roomPlayer, GameObject gamePlayer) { gamePlayer.GetComponent <GamePlayer>().index = roomPlayer.GetComponent <NetworkRoomPlayer>().index; gamePlayer.GetComponent <GamePlayer>().playerName = roomPlayer.GetComponent <RoomPlayerCustom>().playerName; GameSceneLoaded?.Invoke(); return(true); }
public void GamePlayerInScene() { Debug.Log(gamePlayers.gamePlayers.Count + " " + roomSlots.Count); if (gamePlayers.gamePlayers.Count == roomSlots.Count) { Debug.Log("gampelay scene all loaded"); GameSceneLoaded?.Invoke(); } }
private void Start() { if (singleton == null) { singleton = this; EnableInitializeGame(); GameSceneLoaded?.Invoke(); return; } Destroy(gameObject); }