From 7bc7b31df446d1bbc16009951df6bb36c8860958 Mon Sep 17 00:00:00 2001 From: MrGadget1024 Date: Sat, 2 Oct 2021 13:20:52 -0400 Subject: [PATCH] Minor changes to Room example --- .../Room/Scripts/NetworkRoomManagerExt.cs | 2 -- .../Room/Scripts/NetworkRoomPlayerExt.cs | 21 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Assets/Mirror/Examples/Room/Scripts/NetworkRoomManagerExt.cs b/Assets/Mirror/Examples/Room/Scripts/NetworkRoomManagerExt.cs index 8724cd365..14dbd98cc 100644 --- a/Assets/Mirror/Examples/Room/Scripts/NetworkRoomManagerExt.cs +++ b/Assets/Mirror/Examples/Room/Scripts/NetworkRoomManagerExt.cs @@ -17,9 +17,7 @@ public override void OnRoomServerSceneChanged(string sceneName) { // spawn the initial batch of Rewards if (sceneName == GameplayScene) - { Spawner.InitialSpawn(); - } } /// diff --git a/Assets/Mirror/Examples/Room/Scripts/NetworkRoomPlayerExt.cs b/Assets/Mirror/Examples/Room/Scripts/NetworkRoomPlayerExt.cs index d59e55409..27066229a 100644 --- a/Assets/Mirror/Examples/Room/Scripts/NetworkRoomPlayerExt.cs +++ b/Assets/Mirror/Examples/Room/Scripts/NetworkRoomPlayerExt.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.SceneManagement; namespace Mirror.Examples.NetworkRoom { @@ -7,24 +8,32 @@ public class NetworkRoomPlayerExt : NetworkRoomPlayer { public override void OnStartClient() { - // Debug.LogFormat(LogType.Log, "OnStartClient {0}", SceneManager.GetActiveScene().path); - - base.OnStartClient(); + //Debug.Log($"OnStartClient {gameObject}"); } public override void OnClientEnterRoom() { - // Debug.LogFormat(LogType.Log, "OnClientEnterRoom {0}", SceneManager.GetActiveScene().path); + //Debug.Log($"OnClientEnterRoom {SceneManager.GetActiveScene().path}"); } public override void OnClientExitRoom() { - // Debug.LogFormat(LogType.Log, "OnClientExitRoom {0}", SceneManager.GetActiveScene().path); + //Debug.Log($"OnClientExitRoom {SceneManager.GetActiveScene().path}"); + } + + public override void IndexChanged(int oldIndex, int newIndex) + { + //Debug.Log($"IndexChanged {newIndex}"); } public override void ReadyStateChanged(bool oldReadyState, bool newReadyState) { - // Debug.LogFormat(LogType.Log, "ReadyStateChanged {0}", newReadyState); + //Debug.Log($"ReadyStateChanged {newReadyState}"); + } + + public override void OnGUI() + { + base.OnGUI(); } } }