Skip to content

Commit

Permalink
fix: old refs to NetMan
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Nov 3, 2020
1 parent 158c8e7 commit 0df8c89
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Assets/Mirror/Components/HeadlessFrameLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Mirror
{
public class HeadlessFrameLimiter : MonoBehaviour
{
static readonly ILogger logger = LogFactory.GetLogger<NetworkManager>();
static readonly ILogger logger = LogFactory.GetLogger<HeadlessFrameLimiter>();

/// <summary>
/// Server Update frequency, per second. Use around 60Hz for fast paced games like Counter-Strike to minimize latency. Use around 30Hz for games like WoW to minimize computations. Use around 1-10Hz for slow paced games like EVE.
Expand Down
10 changes: 5 additions & 5 deletions Assets/Mirror/Runtime/ClientObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public GameObject GetPrefab(Guid assetId)
/// <summary>
/// Registers a prefab with the spawning system.
/// <para>When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId.</para>
/// <para>The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The ClientObjectManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references.</para>
/// </summary>
/// <param name="prefab">A Prefab that will be spawned.</param>
Expand All @@ -194,7 +194,7 @@ public void RegisterPrefab(GameObject prefab, Guid newAssetId)
/// <summary>
/// Registers a prefab with the spawning system.
/// <para>When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId.</para>
/// <para>The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The ClientObjectManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references.</para>
/// </summary>
/// <param name="prefab">A Prefab that will be spawned.</param>
Expand Down Expand Up @@ -222,7 +222,7 @@ public void RegisterPrefab(GameObject prefab)
/// <summary>
/// Registers a prefab with the spawning system.
/// <para>When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId.</para>
/// <para>The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The ClientObjectManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references.</para>
/// </summary>
/// <param name="prefab">A Prefab that will be spawned.</param>
Expand All @@ -236,7 +236,7 @@ public void RegisterPrefab(GameObject prefab, SpawnDelegate spawnHandler, UnSpaw
/// <summary>
/// Registers a prefab with the spawning system.
/// <para>When a NetworkIdentity object is spawned on a server with NetworkServer.SpawnObject(), and the prefab that the object was created from was registered with RegisterPrefab(), the client will use that prefab to instantiate a corresponding client object with the same netId.</para>
/// <para>The NetworkManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The ClientObjectManager has a list of spawnable prefabs, it uses this function to register those prefabs with the ClientScene.</para>
/// <para>The set of current spawnable object is available in the ClientScene static member variable ClientScene.prefabs, which is a dictionary of NetworkAssetIds and prefab references.</para>
/// </summary>
/// <param name="prefab">A Prefab that will be spawned.</param>
Expand Down Expand Up @@ -460,7 +460,7 @@ NetworkIdentity SpawnPrefab(SpawnMessage msg)

return obj.GetComponent<NetworkIdentity>();
}
logger.LogError("Failed to spawn server object, did you forget to add it to the NetworkManager? assetId=" + msg.assetId + " netId=" + msg.netId);
logger.LogError("Failed to spawn server object, did you forget to add it to the ClientObjectManager? assetId=" + msg.assetId + " netId=" + msg.netId);
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion Assets/Mirror/Runtime/NetworkAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public virtual void OnClientAuthenticate(INetworkConnection conn)
void OnValidate()
{
UnityEditor.Undo.RecordObject(this, "Assigned NetworkClient authenticator");
// automatically assign NetworkManager field if we add this to NetworkManager
// automatically assign NetworkClient field if we add this to NetworkClient
NetworkClient client = GetComponent<NetworkClient>();
if (client != null && client.authenticator == null)
{
Expand Down
1 change: 0 additions & 1 deletion Assets/Mirror/Runtime/NetworkClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public enum ConnectState
/// This is a network client class used by the networking system. It contains a NetworkConnection that is used to connect to a network server.
/// <para>The <see cref="NetworkClient">NetworkClient</see> handle connection state, messages handlers, and connection configuration. There can be many <see cref="NetworkClient">NetworkClient</see> instances in a process at a time, but only one that is connected to a game server (<see cref="NetworkServer">NetworkServer</see>) that uses spawned objects.</para>
/// <para><see cref="NetworkClient">NetworkClient</see> has an internal update function where it handles events from the transport layer. This includes asynchronous connect events, disconnect events and incoming data from a server.</para>
/// <para>The <see cref="NetworkManager">NetworkManager</see> has a NetworkClient instance that it uses for games that it starts, but the NetworkClient may be used by itself.</para>
/// </summary>
[AddComponentMenu("Network/NetworkClient")]
[DisallowMultipleComponent]
Expand Down
4 changes: 2 additions & 2 deletions Assets/Mirror/Runtime/PlayerSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void OnClientSceneChanged(string sceneName, SceneOperation sceneOperatio

void OnServerAddPlayerInternal(INetworkConnection conn, AddPlayerMessage msg)
{
logger.Log("NetworkManager.OnServerAddPlayer");
logger.Log("PlayerSpawner.OnServerAddPlayer");

if (conn.Identity != null)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ public virtual Transform GetStartPosition()
public enum PlayerSpawnMethod { Random, RoundRobin }

/// <summary>
/// The current method of spawning players used by the NetworkManager.
/// The current method of spawning players used by the PlayerSpawner.
/// </summary>
[Tooltip("Round Robin or Random order of Start Position selection")]
public PlayerSpawnMethod playerSpawnMethod;
Expand Down

0 comments on commit 0df8c89

Please sign in to comment.