mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Class Namespaces renamed to Mirror / Mirror.Weaver everywhere
This commit is contained in:
parent
e015908895
commit
a7eaaa8530
@ -1,10 +1,10 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEditor.Animations;
|
using UnityEditor.Animations;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkAnimator), true)]
|
[CustomEditor(typeof(NetworkAnimator), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkBehaviour), true)]
|
[CustomEditor(typeof(NetworkBehaviour), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkIdentity), true)]
|
[CustomEditor(typeof(NetworkIdentity), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using UnityObject = UnityEngine.Object;
|
using UnityObject = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UnityEditor.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomPreview(typeof(GameObject))]
|
[CustomPreview(typeof(GameObject))]
|
||||||
class NetworkInformationPreview : ObjectPreview
|
class NetworkInformationPreview : ObjectPreview
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEditorInternal;
|
using UnityEditorInternal;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using UnityObject = UnityEngine.Object;
|
using UnityObject = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkManager), true)]
|
[CustomEditor(typeof(NetworkManager), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using UnityObject = UnityEngine.Object;
|
using UnityObject = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkManagerHUD), true)]
|
[CustomEditor(typeof(NetworkManagerHUD), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using UnityObject = UnityEngine.Object;
|
using UnityObject = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UnityEditor.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomPreview(typeof(NetworkManager))]
|
[CustomPreview(typeof(NetworkManager))]
|
||||||
class NetworkManagerPreview : ObjectPreview
|
class NetworkManagerPreview : ObjectPreview
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEditor.Callbacks;
|
using UnityEditor.Callbacks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class NetworkScenePostProcess : MonoBehaviour
|
public class NetworkScenePostProcess : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
|
namespace Mirror
|
||||||
namespace UnityEditor
|
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkTransformChild), true)]
|
[CustomEditor(typeof(NetworkTransformChild), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkTransform), true)]
|
[CustomEditor(typeof(NetworkTransform), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
using UnityObject = UnityEngine.Object;
|
using UnityObject = UnityEngine.Object;
|
||||||
|
|
||||||
namespace UnityEditor.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomPreview(typeof(GameObject))]
|
[CustomPreview(typeof(GameObject))]
|
||||||
class NetworkTransformPreview : ObjectPreview
|
class NetworkTransformPreview : ObjectPreview
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace UnityEditor
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(NetworkTransformVisualizer), true)]
|
[CustomEditor(typeof(NetworkTransformVisualizer), true)]
|
||||||
[CanEditMultipleObjects]
|
[CanEditMultipleObjects]
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class ClientScene
|
public class ClientScene
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class NetworkSettingsAttribute : Attribute
|
public class NetworkSettingsAttribute : Attribute
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
internal static class DotNetCompatibility
|
internal static class DotNetCompatibility
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
sealed class LocalClient : NetworkClient
|
sealed class LocalClient : NetworkClient
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// a server's connection TO a LocalClient.
|
// a server's connection TO a LocalClient.
|
||||||
// sending messages on this connection causes the client's handler function to be invoked directly
|
// sending messages on this connection causes the client's handler function to be invoked directly
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class LogFilter
|
public class LogFilter
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// This can't be an interface because users don't need to implement the
|
// This can't be an interface because users don't need to implement the
|
||||||
// serialization functions, we'll code generate it for them when they omit it.
|
// serialization functions, we'll code generate it for them when they omit it.
|
||||||
@ -15,10 +16,7 @@ public virtual void Deserialize(NetworkReader reader) {}
|
|||||||
// Serialize the contents of this message into the writer
|
// Serialize the contents of this message into the writer
|
||||||
public virtual void Serialize(NetworkWriter writer) {}
|
public virtual void Serialize(NetworkWriter writer) {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
namespace UnityEngine.Networking.NetworkSystem
|
|
||||||
{
|
|
||||||
// ---------- General Typed Messages -------------------
|
// ---------- General Typed Messages -------------------
|
||||||
|
|
||||||
public class StringMessage : MessageBase
|
public class StringMessage : MessageBase
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu("Network/NetworkAnimator")]
|
[AddComponentMenu("Network/NetworkAnimator")]
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[RequireComponent(typeof(NetworkIdentity))]
|
[RequireComponent(typeof(NetworkIdentity))]
|
||||||
[AddComponentMenu("")]
|
[AddComponentMenu("")]
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class NetworkClient
|
public class NetworkClient
|
||||||
{
|
{
|
||||||
@ -213,6 +213,7 @@ void GenerateConnectError(byte error)
|
|||||||
GenerateError(error);
|
GenerateError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO use or remove
|
||||||
void GenerateDataError(byte error)
|
void GenerateDataError(byte error)
|
||||||
{
|
{
|
||||||
NetworkError dataError = (NetworkError)error;
|
NetworkError dataError = (NetworkError)error;
|
||||||
@ -226,6 +227,7 @@ void GenerateDisconnectError(byte error)
|
|||||||
if (LogFilter.logError) { Debug.LogError("UNet Client Disconnect Error: " + disconnectError); }
|
if (LogFilter.logError) { Debug.LogError("UNet Client Disconnect Error: " + disconnectError); }
|
||||||
GenerateError(error);
|
GenerateError(error);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void GenerateError(byte error)
|
void GenerateError(byte error)
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* wire protocol is a list of : size | msgType | payload
|
* wire protocol is a list of : size | msgType | payload
|
||||||
@ -20,8 +21,6 @@ public class NetworkConnection : IDisposable
|
|||||||
|
|
||||||
HashSet<NetworkInstanceId> m_ClientOwnedObjects;
|
HashSet<NetworkInstanceId> m_ClientOwnedObjects;
|
||||||
|
|
||||||
private NetworkError error;
|
|
||||||
|
|
||||||
public int hostId = -1;
|
public int hostId = -1;
|
||||||
public int connectionId = -1;
|
public int connectionId = -1;
|
||||||
public bool isReady;
|
public bool isReady;
|
||||||
@ -32,8 +31,6 @@ public class NetworkConnection : IDisposable
|
|||||||
public bool logNetworkMessages = false;
|
public bool logNetworkMessages = false;
|
||||||
public bool isConnected { get { return hostId != -1; }}
|
public bool isConnected { get { return hostId != -1; }}
|
||||||
|
|
||||||
public NetworkError lastError { get { return error; } internal set { error = value; } }
|
|
||||||
|
|
||||||
public virtual void Initialize(string networkAddress, int networkHostId, int networkConnectionId)
|
public virtual void Initialize(string networkAddress, int networkHostId, int networkConnectionId)
|
||||||
{
|
{
|
||||||
address = networkAddress;
|
address = networkAddress;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// vis2k: NetworkHash128 explanation
|
// vis2k: NetworkHash128 explanation
|
||||||
// -> AssetDatabase.AssetPathToGUID returns a 32 length hex string
|
// -> AssetDatabase.AssetPathToGUID returns a 32 length hex string
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public struct NetworkInstanceId
|
public struct NetworkInstanceId
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking.Types;
|
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public enum PlayerSpawnMethod
|
public enum PlayerSpawnMethod
|
||||||
{
|
{
|
||||||
@ -25,10 +23,6 @@ public class NetworkManager : MonoBehaviour
|
|||||||
[SerializeField] string m_NetworkAddress = "localhost";
|
[SerializeField] string m_NetworkAddress = "localhost";
|
||||||
[SerializeField] bool m_DontDestroyOnLoad = true;
|
[SerializeField] bool m_DontDestroyOnLoad = true;
|
||||||
[SerializeField] bool m_RunInBackground = true;
|
[SerializeField] bool m_RunInBackground = true;
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
[SerializeField] bool m_ScriptCRCCheck = true;
|
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
[SerializeField] float m_MaxDelay = 0.01f;
|
|
||||||
[SerializeField] LogFilter.FilterLevel m_LogLevel = LogFilter.FilterLevel.Info;
|
[SerializeField] LogFilter.FilterLevel m_LogLevel = LogFilter.FilterLevel.Info;
|
||||||
[SerializeField] GameObject m_PlayerPrefab;
|
[SerializeField] GameObject m_PlayerPrefab;
|
||||||
[SerializeField] bool m_AutoCreatePlayer = true;
|
[SerializeField] bool m_AutoCreatePlayer = true;
|
||||||
@ -41,13 +35,6 @@ public class NetworkManager : MonoBehaviour
|
|||||||
|
|
||||||
[SerializeField] bool m_UseWebSockets;
|
[SerializeField] bool m_UseWebSockets;
|
||||||
|
|
||||||
#pragma warning disable 0169
|
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
[SerializeField] int m_MaxBufferedPackets;
|
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
[SerializeField] bool m_AllowFragmentation;
|
|
||||||
#pragma warning restore 0169
|
|
||||||
|
|
||||||
bool m_ClientLoadedScene;
|
bool m_ClientLoadedScene;
|
||||||
|
|
||||||
// properties
|
// properties
|
||||||
@ -57,11 +44,6 @@ public class NetworkManager : MonoBehaviour
|
|||||||
public string networkAddress { get { return m_NetworkAddress; } set { m_NetworkAddress = value; } }
|
public string networkAddress { get { return m_NetworkAddress; } set { m_NetworkAddress = value; } }
|
||||||
public bool dontDestroyOnLoad { get { return m_DontDestroyOnLoad; } set { m_DontDestroyOnLoad = value; } }
|
public bool dontDestroyOnLoad { get { return m_DontDestroyOnLoad; } set { m_DontDestroyOnLoad = value; } }
|
||||||
public bool runInBackground { get { return m_RunInBackground; } set { m_RunInBackground = value; } }
|
public bool runInBackground { get { return m_RunInBackground; } set { m_RunInBackground = value; } }
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
public bool scriptCRCCheck { get { return m_ScriptCRCCheck; } set { m_ScriptCRCCheck = value; }}
|
|
||||||
|
|
||||||
[Obsolete("Not used anymore, kept to preserve original HLAPI serialization")]
|
|
||||||
public float maxDelay { get { return m_MaxDelay; } set { m_MaxDelay = value; } }
|
|
||||||
public LogFilter.FilterLevel logLevel { get { return m_LogLevel; } set { m_LogLevel = value; LogFilter.currentLogLevel = value; } }
|
public LogFilter.FilterLevel logLevel { get { return m_LogLevel; } set { m_LogLevel = value; LogFilter.currentLogLevel = value; } }
|
||||||
public GameObject playerPrefab { get { return m_PlayerPrefab; } set { m_PlayerPrefab = value; } }
|
public GameObject playerPrefab { get { return m_PlayerPrefab; } set { m_PlayerPrefab = value; } }
|
||||||
public bool autoCreatePlayer { get { return m_AutoCreatePlayer; } set { m_AutoCreatePlayer = value; } }
|
public bool autoCreatePlayer { get { return m_AutoCreatePlayer; } set { m_AutoCreatePlayer = value; } }
|
||||||
@ -721,16 +703,8 @@ public virtual void OnServerDisconnect(NetworkConnection conn)
|
|||||||
{
|
{
|
||||||
NetworkServer.DestroyPlayersForConnection(conn);
|
NetworkServer.DestroyPlayersForConnection(conn);
|
||||||
|
|
||||||
// note: timeouts happen all the time, no need to throw an error there.
|
// a client disconnected, let's show a message
|
||||||
if (conn.lastError == NetworkError.Ok || conn.lastError == NetworkError.Timeout)
|
if (LogFilter.logError) { Debug.LogError("OnServerDisconnect: Client disconnected."); }
|
||||||
{
|
|
||||||
if (LogFilter.logDebug) { Debug.Log("OnServerDisconnect: client disconnected:" + conn); }
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// a client disconnected, let's show a message
|
|
||||||
if (LogFilter.logError) { Debug.LogError("OnServerDisconnect: Client disconnected with error: " + conn.lastError); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnServerReady(NetworkConnection conn)
|
public virtual void OnServerReady(NetworkConnection conn)
|
||||||
@ -846,10 +820,6 @@ public virtual void OnClientConnect(NetworkConnection conn)
|
|||||||
public virtual void OnClientDisconnect(NetworkConnection conn)
|
public virtual void OnClientDisconnect(NetworkConnection conn)
|
||||||
{
|
{
|
||||||
StopClient();
|
StopClient();
|
||||||
if (conn.lastError != NetworkError.Ok)
|
|
||||||
{
|
|
||||||
if (LogFilter.logError) { Debug.LogError("ClientDisconnected due to error: " + conn.lastError); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnClientError(NetworkConnection conn, int errorCode)
|
public virtual void OnClientError(NetworkConnection conn, int errorCode)
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
// confusion if someone accidentally presses one.
|
// confusion if someone accidentally presses one.
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[AddComponentMenu("Network/NetworkManagerHUD")]
|
[AddComponentMenu("Network/NetworkManagerHUD")]
|
||||||
[RequireComponent(typeof(NetworkManager))]
|
[RequireComponent(typeof(NetworkManager))]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[AddComponentMenu("Network/NetworkProximityChecker")]
|
[AddComponentMenu("Network/NetworkProximityChecker")]
|
||||||
[RequireComponent(typeof(NetworkIdentity))]
|
[RequireComponent(typeof(NetworkIdentity))]
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class NetworkReader
|
public class NetworkReader
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// This is an internal class to allow the client and server to share scene-related functionality.
|
// This is an internal class to allow the client and server to share scene-related functionality.
|
||||||
// This code (mostly) used to be in ClientScene.
|
// This code (mostly) used to be in ClientScene.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public struct NetworkSceneId
|
public struct NetworkSceneId
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking.Types;
|
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public sealed class NetworkServer
|
public sealed class NetworkServer
|
||||||
{
|
{
|
||||||
@ -407,7 +406,6 @@ static void HandleConnect(int connectionId, byte error)
|
|||||||
NetworkConnection conn = (NetworkConnection)Activator.CreateInstance(s_NetworkConnectionClass);
|
NetworkConnection conn = (NetworkConnection)Activator.CreateInstance(s_NetworkConnectionClass);
|
||||||
conn.SetHandlers(s_MessageHandlers);
|
conn.SetHandlers(s_MessageHandlers);
|
||||||
conn.Initialize(address, s_ServerHostId, connectionId);
|
conn.Initialize(address, s_ServerHostId, connectionId);
|
||||||
conn.lastError = (NetworkError)0;
|
|
||||||
|
|
||||||
// add connection at correct index
|
// add connection at correct index
|
||||||
while (s_Connections.Count <= connectionId)
|
while (s_Connections.Count <= connectionId)
|
||||||
@ -434,17 +432,6 @@ static void HandleDisconnect(int connectionId, byte error)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
conn.lastError = (NetworkError)error;
|
|
||||||
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
if ((NetworkError)error != NetworkError.Timeout)
|
|
||||||
{
|
|
||||||
s_Connections[connectionId] = null;
|
|
||||||
if (LogFilter.logError) { Debug.LogError("Server client disconnect error, connectionId: " + connectionId + " error: " + (NetworkError)error); }
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conn.Disconnect();
|
conn.Disconnect();
|
||||||
s_Connections[connectionId] = null;
|
s_Connections[connectionId] = null;
|
||||||
@ -484,13 +471,6 @@ static void HandleData(int connectionId, byte[] data, byte error)
|
|||||||
if (LogFilter.logError) { Debug.LogError("HandleData Unknown connectionId:" + connectionId); }
|
if (LogFilter.logError) { Debug.LogError("HandleData Unknown connectionId:" + connectionId); }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
conn.lastError = (NetworkError)error;
|
|
||||||
|
|
||||||
if (error != 0)
|
|
||||||
{
|
|
||||||
GenerateDataError(conn, error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
OnData(conn, data);
|
OnData(conn, data);
|
||||||
}
|
}
|
||||||
@ -506,6 +486,7 @@ static void GenerateConnectError(byte error)
|
|||||||
GenerateError(null, error);
|
GenerateError(null, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO use or remove
|
||||||
static void GenerateDataError(NetworkConnection conn, byte error)
|
static void GenerateDataError(NetworkConnection conn, byte error)
|
||||||
{
|
{
|
||||||
NetworkError dataError = (NetworkError)error;
|
NetworkError dataError = (NetworkError)error;
|
||||||
@ -519,6 +500,7 @@ static void GenerateDisconnectError(NetworkConnection conn, byte error)
|
|||||||
if (LogFilter.logError) { Debug.LogError("UNet Server Disconnect Error: " + disconnectError + " conn:[" + conn + "]:" + conn.connectionId); }
|
if (LogFilter.logError) { Debug.LogError("UNet Server Disconnect Error: " + disconnectError + " conn:[" + conn + "]:" + conn.connectionId); }
|
||||||
GenerateError(conn, error);
|
GenerateError(conn, error);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void GenerateError(NetworkConnection conn, byte error)
|
static void GenerateError(NetworkConnection conn, byte error)
|
||||||
{
|
{
|
||||||
@ -1175,7 +1157,7 @@ static void DestroyObject(NetworkIdentity uv, bool destroyServerObject)
|
|||||||
// when unspawning, dont destroy the server's object
|
// when unspawning, dont destroy the server's object
|
||||||
if (destroyServerObject)
|
if (destroyServerObject)
|
||||||
{
|
{
|
||||||
Object.Destroy(uv.gameObject);
|
UnityEngine.Object.Destroy(uv.gameObject);
|
||||||
}
|
}
|
||||||
uv.MarkForReset();
|
uv.MarkForReset();
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu("Network/NetworkStartPosition")]
|
[AddComponentMenu("Network/NetworkStartPosition")]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[AddComponentMenu("Network/NetworkTransformChild")]
|
[AddComponentMenu("Network/NetworkTransformChild")]
|
||||||
public class NetworkTransformChild : NetworkBehaviour
|
public class NetworkTransformChild : NetworkBehaviour
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu("Network/NetworkTransform")]
|
[AddComponentMenu("Network/NetworkTransform")]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu("Network/NetworkTransformVisualizer")]
|
[AddComponentMenu("Network/NetworkTransformVisualizer")]
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// Binary stream Writer. Supports simple types, buffers, arrays, structs, and nested types
|
// Binary stream Writer. Supports simple types, buffers, arrays, structs, and nested types
|
||||||
public class NetworkWriter
|
public class NetworkWriter
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// This class represents the player entity in a network game, there can be multiple players per client
|
// This class represents the player entity in a network game, there can be multiple players per client
|
||||||
// when there are multiple people playing on one machine
|
// when there are multiple people playing on one machine
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using UnityEngine.Networking.NetworkSystem;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public sealed class SyncListString : SyncList<string>
|
public sealed class SyncListString : SyncList<string>
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
// wraps UNET's LLAPI for use as HLAPI TransportLayer
|
// wraps UNET's LLAPI for use as HLAPI TransportLayer
|
||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Networking;
|
||||||
using UnityEngine.Networking.Types;
|
using UnityEngine.Networking.Types;
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class LLAPITransport : TransportLayer
|
public class LLAPITransport : TransportLayer
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// wraps Telepathy for use as HLAPI TransportLayer
|
// wraps Telepathy for use as HLAPI TransportLayer
|
||||||
namespace UnityEngine.Networking
|
using UnityEngine;
|
||||||
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class TelepathyTransport : TransportLayer
|
public class TelepathyTransport : TransportLayer
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
// multiplex transport that uses either:
|
// multiplex transport that uses either:
|
||||||
// * Telepathy for standalone (windows/mac/linux/mobile/etc.)
|
// * Telepathy for standalone (windows/mac/linux/mobile/etc.)
|
||||||
// * UNET's LLAPI for websockets
|
// * UNET's LLAPI for websockets
|
||||||
namespace UnityEngine.Networking
|
using UnityEngine;
|
||||||
|
namespace Mirror
|
||||||
{
|
{
|
||||||
public class TelepathyWebsocketsMultiplexTransport : TransportLayer
|
public class TelepathyWebsocketsMultiplexTransport : TransportLayer
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// transport layer backend
|
// transport layer backend
|
||||||
// - set to telepathy by default
|
// - set to telepathy by default
|
||||||
// - can be changed by assigning Transport.layer to whatever you want
|
// - can be changed by assigning Transport.layer to whatever you want
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// Transport class used by HLAPI ///////////////////////////////////////////
|
// Transport class used by HLAPI ///////////////////////////////////////////
|
||||||
public static class Transport
|
public static class Transport
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
#if ENABLE_UNET
|
#if ENABLE_UNET
|
||||||
|
|
||||||
namespace UnityEngine.Networking
|
namespace Mirror
|
||||||
{
|
{
|
||||||
// Handles network messages on client and server
|
// Handles network messages on client and server
|
||||||
public delegate void NetworkMessageDelegate(NetworkMessage netMsg);
|
public delegate void NetworkMessageDelegate(NetworkMessage netMsg);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking.Tests
|
namespace Mirror.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class NetworkHash128Test
|
public class NetworkHash128Test
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace UnityEngine.Networking.Tests
|
namespace Mirror.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class NetworkWriterTest
|
public class NetworkWriterTest
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
// Information about this assembly is defined by the following attributes.
|
// Information about this assembly is defined by the following attributes.
|
||||||
// Change them to the values specific to your project.
|
// Change them to the values specific to your project.
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Unity.UNetWeaver")]
|
[assembly: AssemblyTitle("Mirror.Weaver")]
|
||||||
[assembly: AssemblyDescription("UNET assembly post processor for code generation.")]
|
[assembly: AssemblyDescription("Mirror assembly post processor for code generation.")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("Unity Technologies")]
|
[assembly: AssemblyCompany("vis2k")]
|
||||||
[assembly: AssemblyProduct("Unity.UNetWeaver")]
|
[assembly: AssemblyProduct("Mirror")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
|
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
using Mono.Cecil.Mdb;
|
using Mono.Cecil.Mdb;
|
||||||
using Mono.Cecil.Pdb;
|
using Mono.Cecil.Pdb;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
class Helpers
|
class Helpers
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
using Mono.Cecil.Cil;
|
using Mono.Cecil.Cil;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
class MessageClassProcessor
|
class MessageClassProcessor
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
class MonoBehaviourProcessor
|
class MonoBehaviourProcessor
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
public static class Log
|
public static class Log
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
using Mono.Cecil.Cil;
|
using Mono.Cecil.Cil;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
class SyncListStructProcessor
|
class SyncListStructProcessor
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
using Mono.Cecil.Cil;
|
using Mono.Cecil.Cil;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
class NetworkBehaviourProcessor
|
class NetworkBehaviourProcessor
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
using Mono.Cecil.Pdb;
|
using Mono.Cecil.Pdb;
|
||||||
using Mono.Cecil.Mdb;
|
using Mono.Cecil.Mdb;
|
||||||
|
|
||||||
namespace Unity.UNetWeaver
|
namespace Mirror.Weaver
|
||||||
{
|
{
|
||||||
public enum OutSymbolsFormat
|
public enum OutSymbolsFormat
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user