From 745aea8f9a78b264ab572ec6864956547d698143 Mon Sep 17 00:00:00 2001 From: Chris Langsenkamp Date: Mon, 10 Feb 2020 16:14:22 -0500 Subject: [PATCH] Added Deprecated dates to Obsoletes --- .../Mirror/Components/NetworkRoomManager.cs | 1 + Assets/Mirror/Runtime/ClientScene.cs | 1 + Assets/Mirror/Runtime/CustomAttributes.cs | 1 + Assets/Mirror/Runtime/MessagePacker.cs | 1 + Assets/Mirror/Runtime/Messages.cs | 10 ++ Assets/Mirror/Runtime/NetworkBehaviour.cs | 4 +- Assets/Mirror/Runtime/NetworkClient.cs | 13 ++- Assets/Mirror/Runtime/NetworkConnection.cs | 13 ++- Assets/Mirror/Runtime/NetworkIdentity.cs | 7 +- Assets/Mirror/Runtime/NetworkManager.cs | 10 +- Assets/Mirror/Runtime/NetworkServer.cs | 30 ++++-- Assets/Mirror/Runtime/NetworkWriter.cs | 98 +++++++++++++------ Assets/Mirror/Runtime/SyncDictionary.cs | 3 +- Assets/Mirror/Runtime/SyncList.cs | 10 +- .../Runtime/Transport/TelepathyTransport.cs | 1 + Assets/Mirror/Runtime/Transport/Transport.cs | 2 + Assets/Mirror/Runtime/UNetwork.cs | 1 + 17 files changed, 148 insertions(+), 58 deletions(-) diff --git a/Assets/Mirror/Components/NetworkRoomManager.cs b/Assets/Mirror/Components/NetworkRoomManager.cs index 9d1995910..04e8eb8aa 100644 --- a/Assets/Mirror/Components/NetworkRoomManager.cs +++ b/Assets/Mirror/Components/NetworkRoomManager.cs @@ -540,6 +540,7 @@ public virtual void OnRoomServerAddPlayer(NetworkConnection conn) base.OnServerAddPlayer(conn); } + // Deprecated 12/17/2019 /// /// Obsolete: Use instead. /// diff --git a/Assets/Mirror/Runtime/ClientScene.cs b/Assets/Mirror/Runtime/ClientScene.cs index 985eed215..83b040154 100644 --- a/Assets/Mirror/Runtime/ClientScene.cs +++ b/Assets/Mirror/Runtime/ClientScene.cs @@ -454,6 +454,7 @@ public static void DestroyAllClientObjects() NetworkIdentity.spawned.Clear(); } + // Deprecated 01/15/2019 /// /// Obsolete: Use instead. /// diff --git a/Assets/Mirror/Runtime/CustomAttributes.cs b/Assets/Mirror/Runtime/CustomAttributes.cs index 530f98b9f..4610fe243 100644 --- a/Assets/Mirror/Runtime/CustomAttributes.cs +++ b/Assets/Mirror/Runtime/CustomAttributes.cs @@ -4,6 +4,7 @@ namespace Mirror { + // Deprecated 12/31/2018 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkBehaviour.syncInterval field instead. Can be modified in the Inspector too.")] [AttributeUsage(AttributeTargets.Class)] public class NetworkSettingsAttribute : Attribute diff --git a/Assets/Mirror/Runtime/MessagePacker.cs b/Assets/Mirror/Runtime/MessagePacker.cs index 3eef56bf4..96dd88752 100644 --- a/Assets/Mirror/Runtime/MessagePacker.cs +++ b/Assets/Mirror/Runtime/MessagePacker.cs @@ -33,6 +33,7 @@ public static int GetId(Type type) // pack message before sending // -> NetworkWriter passed as arg so that we can use .ToArraySegment // and do an allocation free send before recycling it. + // Deprecated 03/03/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use Pack instead")] public static byte[] PackMessage(int msgType, MessageBase msg) { diff --git a/Assets/Mirror/Runtime/Messages.cs b/Assets/Mirror/Runtime/Messages.cs index b60f3950a..ee5a59737 100644 --- a/Assets/Mirror/Runtime/Messages.cs +++ b/Assets/Mirror/Runtime/Messages.cs @@ -20,6 +20,8 @@ public virtual void Serialize(NetworkWriter writer) { } } #region General Typed Messages + + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class StringMessage : MessageBase { @@ -43,6 +45,7 @@ public override void Serialize(NetworkWriter writer) } } + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class ByteMessage : MessageBase { @@ -66,6 +69,7 @@ public override void Serialize(NetworkWriter writer) } } + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class BytesMessage : MessageBase { @@ -89,6 +93,7 @@ public override void Serialize(NetworkWriter writer) } } + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class IntegerMessage : MessageBase { @@ -112,6 +117,7 @@ public override void Serialize(NetworkWriter writer) } } + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class DoubleMessage : MessageBase { @@ -135,6 +141,7 @@ public override void Serialize(NetworkWriter writer) } } + // Deprecated 11/20/2019 [Obsolete("Create your own message class instead")] public class EmptyMessage : MessageBase { @@ -181,12 +188,14 @@ public void Serialize(NetworkWriter writer) { } public struct AddPlayerMessage : IMessageBase { + // Deprecated 09/29/2019 /// /// Obsolete: Create your own message instead. See Custom Players /// [Obsolete("Create your own message instead. See https://mirror-networking.com/docs/Guides/GameObjects/SpawnPlayerCustom.html")] public byte[] value; + // Deprecated 09/29/2019 /// /// Obsolete: Create your own message instead. See Custom Players /// @@ -196,6 +205,7 @@ public void Deserialize(NetworkReader reader) value = reader.ReadBytesAndSize(); } + // Deprecated 09/29/2019 /// /// Obsolete: Create your own message instead. See Custom Players /// diff --git a/Assets/Mirror/Runtime/NetworkBehaviour.cs b/Assets/Mirror/Runtime/NetworkBehaviour.cs index 00ee7240f..d5ea7b1cb 100644 --- a/Assets/Mirror/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirror/Runtime/NetworkBehaviour.cs @@ -102,6 +102,7 @@ protected void setSyncVarHookGuard(ulong dirtyBit, bool value) syncVarHookGuard &= ~dirtyBit; } + // Deprecated 04/07/2019 /// /// Obsolete: Use instead. /// @@ -802,7 +803,8 @@ public virtual bool OnRebuildObservers(HashSet observers, boo return false; } - [Obsolete("Rename to OnSetHostVisibility instead.")] + // Deprecated 11/21/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Rename to OnSetHostVisibility instead.")] public virtual void OnSetLocalVisibility(bool visible) { } /// diff --git a/Assets/Mirror/Runtime/NetworkClient.cs b/Assets/Mirror/Runtime/NetworkClient.cs index 996b2d2ec..96d9f4ca7 100644 --- a/Assets/Mirror/Runtime/NetworkClient.cs +++ b/Assets/Mirror/Runtime/NetworkClient.cs @@ -22,6 +22,7 @@ public enum ConnectState /// public class NetworkClient { + // Deprecated 03/25/2019 /// /// Obsolete: Use directly. /// Singleton isn't needed anymore, all functions are static now. For example: NetworkClient.Send(message) instead of NetworkClient.singleton.Send(message). @@ -29,6 +30,7 @@ public class NetworkClient [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient directly. Singleton isn't needed anymore, all functions are static now. For example: NetworkClient.Send(message) instead of NetworkClient.singleton.Send(message).")] public static NetworkClient singleton = new NetworkClient(); + // Deprecated 03/25/2019 /// /// A list of all the active network clients in the current process. /// This is NOT a list of all clients that are connected to the remote server, it is client instances on the local game. @@ -225,6 +227,7 @@ static void RemoveTransportHandlers() Transport.activeTransport.OnClientError.RemoveListener(OnError); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead with no message id instead /// @@ -332,6 +335,7 @@ void GenerateError(byte error) } */ + // Deprecated 10/05/2018 /// /// Obsolete: Use instead /// @@ -370,6 +374,7 @@ internal static void RegisterSystemHandlers(bool hostMode) RegisterHandler(ClientScene.OnSyncEventMessage); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead /// @@ -383,6 +388,7 @@ public static void RegisterHandler(int msgType, NetworkMessageDelegate handler) handlers[msgType] = handler; } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead /// @@ -421,6 +427,7 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl RegisterHandler((NetworkConnection _, T value) => { handler(value); }, requireAuthentication); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead /// @@ -430,6 +437,7 @@ public static void UnregisterHandler(int msgType) handlers.Remove(msgType); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead /// @@ -467,10 +475,11 @@ public static void Shutdown() Transport.activeTransport.ClientDisconnect(); } + // Deprecated 03/22/2019 /// - /// Obsolete: Call instead. There is only one client. + /// Obsolete: Call instead. There is only one client. /// - [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Call NetworkClient.Shutdown() instead. There is only one client.")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Call Shutdown() instead. There is only one client.")] public static void ShutdownAll() { Shutdown(); diff --git a/Assets/Mirror/Runtime/NetworkConnection.cs b/Assets/Mirror/Runtime/NetworkConnection.cs index 229261f02..94dfb6032 100644 --- a/Assets/Mirror/Runtime/NetworkConnection.cs +++ b/Assets/Mirror/Runtime/NetworkConnection.cs @@ -64,7 +64,8 @@ public abstract class NetworkConnection : IDisposable /// /// Obsolete: use instead /// - [Obsolete("Use NetworkConnection.identity instead")] + // Deprecated 09/18/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkConnection.identity instead")] public NetworkIdentity playerController { get @@ -103,11 +104,13 @@ internal set // this is always true for regular connections, false for local // connections because it's set in the constructor and never reset. + // Deprecated 02/26/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("isConnected will be removed because it's pointless. A NetworkConnection is always connected.")] public bool isConnected { get; protected set; } // this is always 0 for regular connections, -1 for local // connections because it's set in the constructor and never reset. + // Deprecated 02/26/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("hostId will be removed because it's not needed ever since we removed LLAPI as default. It's always 0 for regular connections and -1 for local connections. Use connection.GetType() == typeof(NetworkConnection) to check if it's a regular or local connection.")] public int hostId = -1; @@ -163,8 +166,9 @@ internal void SetHandlers(Dictionary handlers) messageHandlers = handlers; } + // Deprecated 04/09/2019 /// - /// Obsolete: Use NetworkClient/NetworkServer.RegisterHandler{T} instead + /// Obsolete: Use or instead /// [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient/NetworkServer.RegisterHandler instead")] public void RegisterHandler(short msgType, NetworkMessageDelegate handler) @@ -176,6 +180,7 @@ public void RegisterHandler(short msgType, NetworkMessageDelegate handler) messageHandlers[msgType] = handler; } + // Deprecated 04/09/2019 /// /// Obsolete: Use and instead /// @@ -185,10 +190,11 @@ public void UnregisterHandler(short msgType) messageHandlers.Remove(msgType); } + // Deprecated 03/03/2019 /// /// Obsolete: use instead /// - [EditorBrowsable(EditorBrowsableState.Never), Obsolete("use Send instead")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("use Send(msg, channelId) instead")] public bool Send(int msgType, MessageBase msg, int channelId = Channels.DefaultReliable) { // pack message and send @@ -277,6 +283,7 @@ internal void RemoveObservers() visList.Clear(); } + // Deprecated 04/03/2019 /// /// Obsolete: Use instead /// diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 9cafa3720..5c395467f 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -112,7 +112,8 @@ public sealed class NetworkIdentity : MonoBehaviour /// /// Obsolete: Use instead /// - [Obsolete("Use connectionToClient instead")] + // Deprecated 11/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connectionToClient instead")] public NetworkConnectionToClient clientAuthorityOwner => connectionToClient; /// @@ -191,7 +192,8 @@ internal set /// /// Obsolete: Use instead /// - [Obsolete("Use GetSceneIdentity instead")] + // Deprecated 01/23/2020 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use GetSceneIdentity instead")] public static NetworkIdentity GetSceneIdenity(ulong id) => GetSceneIdentity(id); /// @@ -1051,6 +1053,7 @@ public void RebuildObservers(bool initialize) } } + // Deprecated 09/25/2019 /// /// Obsolete: Use instead /// diff --git a/Assets/Mirror/Runtime/NetworkManager.cs b/Assets/Mirror/Runtime/NetworkManager.cs index 5e5cb3094..aa13866e0 100644 --- a/Assets/Mirror/Runtime/NetworkManager.cs +++ b/Assets/Mirror/Runtime/NetworkManager.cs @@ -150,6 +150,7 @@ public class NetworkManager : MonoBehaviour [NonSerialized] public bool clientLoadedScene; + // Deprecated 03/27/2019 /// /// Obsolete: Use instead /// @@ -160,11 +161,11 @@ public bool IsClientConnected() return NetworkClient.isConnected; } + // Deprecated 04/09/2019 /// /// Obsolete: Use instead. /// This is a static property now. This method will be removed by summer 2019. /// - /// [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use isHeadless instead of IsHeadless()")] public static bool IsHeadless() { @@ -184,6 +185,7 @@ public static bool IsHeadless() // during FinishLoadScene. public NetworkManagerMode mode { get; private set; } + // Deprecated 03/25/2019 /// /// Obsolete: Use directly /// For example, use NetworkClient.Send(message) instead of NetworkManager.client.Send(message) @@ -1274,12 +1276,11 @@ public virtual void OnServerReady(NetworkConnection conn) NetworkServer.SetClientReady(conn); } + // Deprecated 10/02/2019 /// /// Obsolete: Override instead. /// See Custom Players for details. /// - /// Connection from client. - /// An extra message object passed for the new player. [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Override OnServerAddPlayer(NetworkConnection conn) instead. See https://mirror-networking.com/docs/Guides/GameObjects/SpawnPlayerCustom.html for details.")] public virtual void OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage extraMessage) { @@ -1409,6 +1410,7 @@ public virtual void OnClientError(NetworkConnection conn, int errorCode) { } /// Connection to the server. public virtual void OnClientNotReady(NetworkConnection conn) { } + // Deprecated 09/17/2019 /// /// Obsolete: Use instead.). /// @@ -1418,6 +1420,7 @@ public virtual void OnClientChangeScene(string newSceneName) OnClientChangeScene(newSceneName, SceneOperation.Normal, false); } + // Deprecated 12/22/2019 /// /// Obsolete: Use instead.). /// @@ -1474,6 +1477,7 @@ public virtual void OnStartHost() { } /// public virtual void OnStartServer() { } + // Deprecated 03/25/2019 /// /// Obsolete: Use instead of OnStartClient(NetworkClient client). /// All NetworkClient functions are static now, so you can use NetworkClient.Send(message) instead of client.Send(message) directly now. diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index 9f37a7596..edd8d7948 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -256,6 +256,7 @@ static bool SendToObservers(NetworkIdentity identity, T msg) where T : IMessa return false; } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -320,6 +321,7 @@ public static bool SendToAll(T msg, int channelId = Channels.DefaultReliable) return result; } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -555,6 +557,7 @@ static void OnError(int connectionId, Exception exception) Debug.LogException(exception); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -568,6 +571,7 @@ public static void RegisterHandler(int msgType, NetworkMessageDelegate handler) handlers[msgType] = handler; } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -606,6 +610,7 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl RegisterHandler((_, value) => { handler(value); }, requireAuthentication); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -615,6 +620,7 @@ public static void UnregisterHandler(int msgType) handlers.Remove(msgType); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -642,10 +648,11 @@ public static void ClearHandlers() handlers.Clear(); } + // Deprecated 03/03/2019 /// - /// Obsolete: Use instead. + /// Obsolete: Use instead. /// - [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connection.Send(msg) instead.")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkConnection.Send(msg) instead.")] public static void SendToClient(int connectionId, int msgType, MessageBase msg) { if (connections.TryGetValue(connectionId, out NetworkConnectionToClient conn)) @@ -656,14 +663,11 @@ public static void SendToClient(int connectionId, int msgType, MessageBase msg) Debug.LogError("Failed to send message to connection ID '" + connectionId + ", not found in connection list"); } + // Deprecated 10/22/2019 /// - /// Send a message to the client which owns the given connection ID. - /// It accepts the connection ID as a parameter as well as a message and MsgType. Remember to set the client up for receiving the messages by using NetworkClient.RegisterHandler. Also, for user messages you must use a MsgType with a higher ID number than MsgType.Highest. + /// Obsolete: Use instead. /// - /// Message type - /// Client connection ID. - /// Message struct to send - [Obsolete("Use connection.Send(msg) instead")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connection.Send(msg) instead")] public static void SendToClient(int connectionId, T msg) where T : IMessageBase { if (connections.TryGetValue(connectionId, out NetworkConnectionToClient conn)) @@ -674,6 +678,7 @@ public static void SendToClient(int connectionId, T msg) where T : IMessageBa Debug.LogError("Failed to send message to connection ID '" + connectionId + ", not found in connection list"); } + // Deprecated 03/03/2019 /// /// Obsolete: Use instead. /// @@ -1150,6 +1155,7 @@ static bool VerifyCanSpawn(GameObject obj) return true; } + // Deprecated 11/23/2019 /// /// Obsolete: Use instead. /// @@ -1160,6 +1166,7 @@ public static bool SpawnWithClientAuthority(GameObject obj, GameObject player) return true; } + // Deprecated 11/23/2019 /// /// This spawns an object like NetworkServer.Spawn() but also assigns Client Authority to the specified client. /// This is the same as calling NetworkIdentity.AssignClientAuthority on the spawned object. @@ -1184,20 +1191,22 @@ public static void Spawn(GameObject obj, GameObject player) Spawn(obj, identity.connectionToClient); } + // Deprecated 11/23/2019 /// /// Use instead /// - [Obsolete("Use Spawn(obj, connection) instead")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use Spawn(obj, connection) instead")] public static bool SpawnWithClientAuthority(GameObject obj, NetworkConnection ownerConnection) { Spawn(obj, ownerConnection); return true; } + // Deprecated 11/23/2019 /// /// Use instead /// - [Obsolete("Use Spawn(obj, assetId, connection) instead")] + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use Spawn(obj, assetId, connection) instead")] public static bool SpawnWithClientAuthority(GameObject obj, Guid assetId, NetworkConnection ownerConnection) { Spawn(obj, assetId, ownerConnection); @@ -1289,6 +1298,7 @@ public static void UnSpawn(GameObject obj) } } + // Deprecated 01/15/2019 /// /// Obsolete: Use instead. /// diff --git a/Assets/Mirror/Runtime/NetworkWriter.cs b/Assets/Mirror/Runtime/NetworkWriter.cs index 3b57dbfea..1b37b061f 100644 --- a/Assets/Mirror/Runtime/NetworkWriter.cs +++ b/Assets/Mirror/Runtime/NetworkWriter.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.IO; using System.Text; using UnityEngine; @@ -86,98 +87,130 @@ public void WriteUInt64(ulong value) public void WriteInt64(long value) => WriteUInt64((ulong)value); #region Obsoletes - [Obsolete("Use WriteUInt16 instead")] + + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteUInt16 instead")] public void Write(ushort value) => this.WriteUInt16(value); - [Obsolete("Use WriteUInt32 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteUInt32 instead")] public void Write(uint value) => WriteUInt32(value); - [Obsolete("Use WriteUInt64 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteUInt64 instead")] public void Write(ulong value) => WriteUInt64(value); - [Obsolete("Use WriteByte instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteByte instead")] public void Write(byte value) => stream.WriteByte(value); - [Obsolete("Use WriteSByte instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteSByte instead")] public void Write(sbyte value) => WriteByte((byte)value); // write char the same way that NetworkReader reads it (2 bytes) - [Obsolete("Use WriteChar instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteChar instead")] public void Write(char value) => this.WriteUInt16((ushort)value); - [Obsolete("Use WriteBoolean instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteBoolean instead")] public void Write(bool value) => WriteByte((byte)(value ? 1 : 0)); - [Obsolete("Use WriteInt16 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteInt16 instead")] public void Write(short value) => this.WriteUInt16((ushort)value); - [Obsolete("Use WriteInt32 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteInt32 instead")] public void Write(int value) => WriteUInt32((uint)value); - [Obsolete("Use WriteInt64 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteInt64 instead")] public void Write(long value) => WriteUInt64((ulong)value); - [Obsolete("Use WriteSingle instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteSingle instead")] public void Write(float value) => this.WriteSingle(value); - [Obsolete("Use WriteDouble instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteDouble instead")] public void Write(double value) => this.WriteDouble(value); - [Obsolete("Use WriteDecimal instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteDecimal instead")] public void Write(decimal value) => this.WriteDecimal(value); - [Obsolete("Use WriteString instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteString instead")] public void Write(string value) => this.WriteString(value); - [Obsolete("Use WriteBytes instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteBytes instead")] public void Write(byte[] buffer, int offset, int count) => WriteBytes(buffer, offset, count); - [Obsolete("Use WriteVector2 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteVector2 instead")] public void Write(Vector2 value) => this.WriteVector2(value); - [Obsolete("Use WriteVector3 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteVector3 instead")] public void Write(Vector3 value) => this.WriteVector3(value); - [Obsolete("Use WriteVector4 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteVector4 instead")] public void Write(Vector4 value) => this.WriteVector4(value); - [Obsolete("Use WriteVector2Int instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteVector2Int instead")] public void Write(Vector2Int value) => this.WriteVector2Int(value); - [Obsolete("Use WriteVector3Int instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteVector3Int instead")] public void Write(Vector3Int value) => this.WriteVector3Int(value); - [Obsolete("Use WriteColor instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteColor instead")] public void Write(Color value) => this.WriteColor(value); - [Obsolete("Use WriteColor32 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteColor32 instead")] public void Write(Color32 value) => this.WriteColor32(value); - [Obsolete("Use WriteQuaternion instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteQuaternion instead")] public void Write(Quaternion value) => this.WriteQuaternion(value); - [Obsolete("Use WriteRect instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteRect instead")] public void Write(Rect value) => this.WriteRect(value); - [Obsolete("Use WritePlane instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WritePlane instead")] public void Write(Plane value) => this.WritePlane(value); - [Obsolete("Use WriteRay instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteRay instead")] public void Write(Ray value) => this.WriteRay(value); - [Obsolete("Use WriteMatrix4x4 instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteMatrix4x4 instead")] public void Write(Matrix4x4 value) => this.WriteMatrix4x4(value); - [Obsolete("Use WriteGuid instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteGuid instead")] public void Write(Guid value) => this.WriteGuid(value); - [Obsolete("Use WriteNetworkIdentity instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteNetworkIdentity instead")] public void Write(NetworkIdentity value) => this.WriteNetworkIdentity(value); - [Obsolete("Use WriteTransform instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteTransform instead")] public void Write(Transform value) => this.WriteTransform(value); - [Obsolete("Use WriteGameObject instead")] + // Deprecated 03/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteGameObject instead")] public void Write(GameObject value) => this.WriteGameObject(value); #endregion @@ -566,7 +599,8 @@ public static void WriteMessage(this NetworkWriter writer, T msg) where T : I msg.Serialize(writer); } - [Obsolete("Use WriteMessage instead")] + // Deprecated 02/06/2020 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use WriteMessage instead")] public static void Write(this NetworkWriter writer, T msg) where T : IMessageBase { WriteMessage(writer, msg); diff --git a/Assets/Mirror/Runtime/SyncDictionary.cs b/Assets/Mirror/Runtime/SyncDictionary.cs index 669911958..7ed4a89b1 100644 --- a/Assets/Mirror/Runtime/SyncDictionary.cs +++ b/Assets/Mirror/Runtime/SyncDictionary.cs @@ -23,7 +23,8 @@ public enum Operation : byte OP_CLEAR, OP_REMOVE, OP_SET, - [Obsolete("SyncDictionaries now use OP_SET instead of OP_DIRTY")] + // Deprecated 12/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("SyncDictionaries now use OP_SET instead of OP_DIRTY")] OP_DIRTY } diff --git a/Assets/Mirror/Runtime/SyncList.cs b/Assets/Mirror/Runtime/SyncList.cs index 976d60d9f..5b3a4f24c 100644 --- a/Assets/Mirror/Runtime/SyncList.cs +++ b/Assets/Mirror/Runtime/SyncList.cs @@ -36,8 +36,8 @@ public class SyncListBool : SyncList } // Original UNET name is SyncListStruct and original Weaver weavers anything - // that contains the name 'SyncListStruct', without considering the name- - // space. + // that contains the name 'SyncListStruct', without considering the namespace. + // Deprecated 03/20/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use SyncList instead")] public class SyncListSTRUCT : SyncList where T : struct { @@ -61,11 +61,13 @@ public enum Operation : byte OP_ADD, OP_CLEAR, OP_INSERT, - [Obsolete("Lists now pass OP_REMOVEAT")] + // Deprecated 10/21/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Lists now pass OP_REMOVEAT")] OP_REMOVE, OP_REMOVEAT, OP_SET, - [Obsolete("Lists now use OP_SET instead of OP_DIRTY")] + // Deprecated 12/03/2019 + [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Lists now use OP_SET instead of OP_DIRTY")] OP_DIRTY } diff --git a/Assets/Mirror/Runtime/Transport/TelepathyTransport.cs b/Assets/Mirror/Runtime/Transport/TelepathyTransport.cs index 5ba96e897..dfb963d68 100644 --- a/Assets/Mirror/Runtime/Transport/TelepathyTransport.cs +++ b/Assets/Mirror/Runtime/Transport/TelepathyTransport.cs @@ -21,6 +21,7 @@ public class TelepathyTransport : Transport [Tooltip("Nagle Algorithm can be disabled by enabling NoDelay")] public bool NoDelay = true; + // Deprecated 04/08/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use MaxMessageSizeFromClient or MaxMessageSizeFromServer instead.")] public int MaxMessageSize { diff --git a/Assets/Mirror/Runtime/Transport/Transport.cs b/Assets/Mirror/Runtime/Transport/Transport.cs index 98dc65a78..75ecbe007 100644 --- a/Assets/Mirror/Runtime/Transport/Transport.cs +++ b/Assets/Mirror/Runtime/Transport/Transport.cs @@ -157,6 +157,8 @@ public virtual void ClientConnect(Uri uri) /// /// Deprecated: Use ServerGetClientAddress(int connectionId) instead /// + // Removed 2/17/2019 and restored 3/2/2019 + // Deprecated 03/02/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use ServerGetClientAddress(int connectionId) instead")] public virtual bool GetConnectionInfo(int connectionId, out string address) { diff --git a/Assets/Mirror/Runtime/UNetwork.cs b/Assets/Mirror/Runtime/UNetwork.cs index 81fadd90c..d63a5fc5c 100644 --- a/Assets/Mirror/Runtime/UNetwork.cs +++ b/Assets/Mirror/Runtime/UNetwork.cs @@ -28,6 +28,7 @@ public enum MirrorInvokeType // original HLAPI uses short, so let's keep short to not break packet header etc. // => use .ToString() to get the field name from the field value // => we specify the short values so it's easier to look up opcodes when debugging packets + // Deprecated 03/03/2019 [EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use Send with no message id instead")] public enum MsgType : short {