/// <summary> /// sets the room master. Will need a MatchMakingManager instance for security /// </summary> /// <param name="matchMakingManager"></param> public void SetRoomMaster(MatchMakingManager matchMakingManager) { if (matchMakingManager == MatchMakingManager.Instance) { Master = new RoomMaster(); } else { Debug.LogError("matchmaking manager reference is null or not the singleton instance"); } }
private void Awake() { if (Instance != null && Instance != this) { Destroy(this.gameObject); } else { Instance = this; } DontDestroyOnLoad(this.gameObject); }