From 46c9bddb6c85001966fa850eba57368757257b1b Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 9 Mar 2021 18:53:24 +0800 Subject: [PATCH] cleanup --- Assets/Mirror/Runtime/NetworkManager.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkManager.cs b/Assets/Mirror/Runtime/NetworkManager.cs index 1024eb586..fe03e2bbf 100644 --- a/Assets/Mirror/Runtime/NetworkManager.cs +++ b/Assets/Mirror/Runtime/NetworkManager.cs @@ -1000,22 +1000,15 @@ public static void RegisterStartPosition(Transform start) startPositions = startPositions.OrderBy(transform => transform.GetSiblingIndex()).ToList(); } - /// - /// Unregisters the transform of a game object as a player spawn location. - /// This is done automatically by the NetworkStartPosition component, but can be done manually from user code. - /// - /// Transform to unregister. + /// Unregister a Transform from start positions. + // TODO why is this static? public static void UnRegisterStartPosition(Transform start) { // Debug.Log("UnRegisterStartPosition: (" + start.gameObject.name + ") " + start.position); startPositions.Remove(start); } - /// - /// This finds a spawn position based on NetworkStartPosition objects in the scene. - /// This is used by the default implementation of OnServerAddPlayer. - /// - /// Returns the transform to spawn a player at, or null. + /// Get the next NetworkStartPosition based on the selected PlayerSpawnMethod. public Transform GetStartPosition() { // first remove any dead transforms @@ -1053,6 +1046,7 @@ void OnServerConnectInternal(NetworkConnection conn) } // called after successful authentication + // TODO do the NetworkServer.OnAuthenticated thing from x branch void OnServerAuthenticated(NetworkConnection conn) { //Debug.Log("NetworkManager.OnServerAuthenticated");