mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Added Deprecated dates to Obsoletes
This commit is contained in:
parent
67deaeaa76
commit
745aea8f9a
@ -540,6 +540,7 @@ public virtual void OnRoomServerAddPlayer(NetworkConnection conn)
|
||||
base.OnServerAddPlayer(conn);
|
||||
}
|
||||
|
||||
// Deprecated 12/17/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="OnRoomServerCreateGamePlayer(NetworkConnection, GameObject)"/> instead.
|
||||
/// </summary>
|
||||
|
@ -454,6 +454,7 @@ public static void DestroyAllClientObjects()
|
||||
NetworkIdentity.spawned.Clear();
|
||||
}
|
||||
|
||||
// Deprecated 01/15/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkIdentity.spawned"/> instead.
|
||||
/// </summary>
|
||||
|
@ -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
|
||||
|
@ -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<T> instead")]
|
||||
public static byte[] PackMessage(int msgType, MessageBase msg)
|
||||
{
|
||||
|
@ -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
|
||||
/// <summary>
|
||||
/// Obsolete: Create your own message instead. See <a href="../Guides/GameObjects/SpawnPlayerCustom.md">Custom Players</a>
|
||||
/// </summary>
|
||||
[Obsolete("Create your own message instead. See https://mirror-networking.com/docs/Guides/GameObjects/SpawnPlayerCustom.html")]
|
||||
public byte[] value;
|
||||
|
||||
// Deprecated 09/29/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Create your own message instead. See <a href="../Guides/GameObjects/SpawnPlayerCustom.md">Custom Players</a>
|
||||
/// </summary>
|
||||
@ -196,6 +205,7 @@ public void Deserialize(NetworkReader reader)
|
||||
value = reader.ReadBytesAndSize();
|
||||
}
|
||||
|
||||
// Deprecated 09/29/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Create your own message instead. See <a href="../Guides/GameObjects/SpawnPlayerCustom.md">Custom Players</a>
|
||||
/// </summary>
|
||||
|
@ -102,6 +102,7 @@ protected void setSyncVarHookGuard(ulong dirtyBit, bool value)
|
||||
syncVarHookGuard &= ~dirtyBit;
|
||||
}
|
||||
|
||||
// Deprecated 04/07/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="syncObjects"/> instead.
|
||||
/// </summary>
|
||||
@ -802,7 +803,8 @@ public virtual bool OnRebuildObservers(HashSet<NetworkConnection> 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) { }
|
||||
|
||||
/// <summary>
|
||||
|
@ -22,6 +22,7 @@ public enum ConnectState
|
||||
/// </summary>
|
||||
public class NetworkClient
|
||||
{
|
||||
// Deprecated 03/25/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkClient"/> directly.
|
||||
/// <para>Singleton isn't needed anymore, all functions are static now. For example: NetworkClient.Send(message) instead of NetworkClient.singleton.Send(message).</para>
|
||||
@ -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
|
||||
/// <summary>
|
||||
/// A list of all the active network clients in the current process.
|
||||
/// <para>This is NOT a list of all clients that are connected to the remote server, it is client instances on the local game.</para>
|
||||
@ -225,6 +227,7 @@ static void RemoveTransportHandlers()
|
||||
Transport.activeTransport.OnClientError.RemoveListener(OnError);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="Send{T}(T, int)"/> instead with no message id instead
|
||||
/// </summary>
|
||||
@ -332,6 +335,7 @@ void GenerateError(byte error)
|
||||
}
|
||||
*/
|
||||
|
||||
// Deprecated 10/05/2018
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkTime.rtt"/> instead
|
||||
/// </summary>
|
||||
@ -370,6 +374,7 @@ internal static void RegisterSystemHandlers(bool hostMode)
|
||||
RegisterHandler<SyncEventMessage>(ClientScene.OnSyncEventMessage);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="RegisterHandler{T}(Action{NetworkConnection, T}, bool)"/> instead
|
||||
/// </summary>
|
||||
@ -383,6 +388,7 @@ public static void RegisterHandler(int msgType, NetworkMessageDelegate handler)
|
||||
handlers[msgType] = handler;
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="RegisterHandler{T}(Action{NetworkConnection, T}, bool)"/> instead
|
||||
/// </summary>
|
||||
@ -421,6 +427,7 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl
|
||||
RegisterHandler((NetworkConnection _, T value) => { handler(value); }, requireAuthentication);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="UnregisterHandler{T}"/> instead
|
||||
/// </summary>
|
||||
@ -430,6 +437,7 @@ public static void UnregisterHandler(int msgType)
|
||||
handlers.Remove(msgType);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="UnregisterHandler{T}"/> instead
|
||||
/// </summary>
|
||||
@ -467,10 +475,11 @@ public static void Shutdown()
|
||||
Transport.activeTransport.ClientDisconnect();
|
||||
}
|
||||
|
||||
// Deprecated 03/22/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Call <see cref="NetworkClient.Shutdown"/> instead. There is only one client.
|
||||
/// Obsolete: Call <see cref="Shutdown"/> instead. There is only one client.
|
||||
/// </summary>
|
||||
[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();
|
||||
|
@ -64,7 +64,8 @@ public abstract class NetworkConnection : IDisposable
|
||||
/// <summary>
|
||||
/// Obsolete: use <see cref="identity"/> instead
|
||||
/// </summary>
|
||||
[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<int, NetworkMessageDelegate> handlers)
|
||||
messageHandlers = handlers;
|
||||
}
|
||||
|
||||
// Deprecated 04/09/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use NetworkClient/NetworkServer.RegisterHandler{T} instead
|
||||
/// Obsolete: Use <see cref="NetworkClient.RegisterHandler{T}"/> or <see cref="NetworkServer.RegisterHandler{T}"/> instead
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient/NetworkServer.RegisterHandler<T> 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
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkClient.UnregisterHandler{T}"/> and <see cref="NetworkServer.UnregisterHandler{T}"/> instead
|
||||
/// </summary>
|
||||
@ -185,10 +190,11 @@ public void UnregisterHandler(short msgType)
|
||||
messageHandlers.Remove(msgType);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: use <see cref="Send{T}(T, int)"/> instead
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("use Send<T> instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("use Send<T>(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
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="InvokeHandler(int, NetworkReader, int)"/> instead
|
||||
/// </summary>
|
||||
|
@ -112,7 +112,8 @@ public sealed class NetworkIdentity : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="connectionToClient" /> instead
|
||||
/// </summary>
|
||||
[Obsolete("Use connectionToClient instead")]
|
||||
// Deprecated 11/03/2019
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connectionToClient instead")]
|
||||
public NetworkConnectionToClient clientAuthorityOwner => connectionToClient;
|
||||
|
||||
/// <summary>
|
||||
@ -191,7 +192,8 @@ internal set
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="GetSceneIdentity(ulong)" /> instead
|
||||
/// </summary>
|
||||
[Obsolete("Use GetSceneIdentity instead")]
|
||||
// Deprecated 01/23/2020
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use GetSceneIdentity instead")]
|
||||
public static NetworkIdentity GetSceneIdenity(ulong id) => GetSceneIdentity(id);
|
||||
|
||||
/// <summary>
|
||||
@ -1051,6 +1053,7 @@ public void RebuildObservers(bool initialize)
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecated 09/25/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="RemoveClientAuthority()"/> instead
|
||||
/// </summary>
|
||||
|
@ -150,6 +150,7 @@ public class NetworkManager : MonoBehaviour
|
||||
[NonSerialized]
|
||||
public bool clientLoadedScene;
|
||||
|
||||
// Deprecated 03/27/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkClient.isConnected"/> instead
|
||||
/// </summary>
|
||||
@ -160,11 +161,11 @@ public bool IsClientConnected()
|
||||
return NetworkClient.isConnected;
|
||||
}
|
||||
|
||||
// Deprecated 04/09/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="isHeadless"/> instead.
|
||||
/// <para>This is a static property now. This method will be removed by summer 2019.</para>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkClient"/> directly
|
||||
/// <para>For example, use <c>NetworkClient.Send(message)</c> instead of <c>NetworkManager.client.Send(message)</c></para>
|
||||
@ -1274,12 +1276,11 @@ public virtual void OnServerReady(NetworkConnection conn)
|
||||
NetworkServer.SetClientReady(conn);
|
||||
}
|
||||
|
||||
// Deprecated 10/02/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Override <see cref="OnServerAddPlayer(NetworkConnection)"/> instead.
|
||||
/// <para>See <a href="../Guides/GameObjects/SpawnPlayerCustom.md">Custom Players</a> for details.</para>
|
||||
/// </summary>
|
||||
/// <param name="conn">Connection from client.</param>
|
||||
/// <param name="extraMessage">An extra message object passed for the new player.</param>
|
||||
[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) { }
|
||||
/// <param name="conn">Connection to the server.</param>
|
||||
public virtual void OnClientNotReady(NetworkConnection conn) { }
|
||||
|
||||
// Deprecated 09/17/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="OnClientChangeScene(string, SceneOperation, bool)"/> instead.).
|
||||
/// </summary>
|
||||
@ -1418,6 +1420,7 @@ public virtual void OnClientChangeScene(string newSceneName)
|
||||
OnClientChangeScene(newSceneName, SceneOperation.Normal, false);
|
||||
}
|
||||
|
||||
// Deprecated 12/22/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="OnClientChangeScene(string, SceneOperation, bool)"/> instead.).
|
||||
/// </summary>
|
||||
@ -1474,6 +1477,7 @@ public virtual void OnStartHost() { }
|
||||
/// </summary>
|
||||
public virtual void OnStartServer() { }
|
||||
|
||||
// Deprecated 03/25/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="OnStartClient()"/> instead of OnStartClient(NetworkClient client).
|
||||
/// <para>All NetworkClient functions are static now, so you can use NetworkClient.Send(message) instead of client.Send(message) directly now.</para>
|
||||
|
@ -256,6 +256,7 @@ static bool SendToObservers<T>(NetworkIdentity identity, T msg) where T : IMessa
|
||||
return false;
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="SendToAll{T}(T, int)"/> instead.
|
||||
/// </summary>
|
||||
@ -320,6 +321,7 @@ public static bool SendToAll<T>(T msg, int channelId = Channels.DefaultReliable)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="SendToReady{T}(NetworkIdentity, T, int)"/> instead.
|
||||
/// </summary>
|
||||
@ -555,6 +557,7 @@ static void OnError(int connectionId, Exception exception)
|
||||
Debug.LogException(exception);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="RegisterHandler{T}(Action{NetworkConnection, T}, bool)"/> instead.
|
||||
/// </summary>
|
||||
@ -568,6 +571,7 @@ public static void RegisterHandler(int msgType, NetworkMessageDelegate handler)
|
||||
handlers[msgType] = handler;
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="RegisterHandler{T}(Action{NetworkConnection, T}, bool)"/> instead.
|
||||
/// </summary>
|
||||
@ -606,6 +610,7 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl
|
||||
RegisterHandler<T>((_, value) => { handler(value); }, requireAuthentication);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="UnregisterHandler{T}"/> instead.
|
||||
/// </summary>
|
||||
@ -615,6 +620,7 @@ public static void UnregisterHandler(int msgType)
|
||||
handlers.Remove(msgType);
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="UnregisterHandler{T}"/> instead.
|
||||
/// </summary>
|
||||
@ -642,10 +648,11 @@ public static void ClearHandlers()
|
||||
handlers.Clear();
|
||||
}
|
||||
|
||||
// Deprecated 03/03/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="SendToClient{T}(int, T)"/> instead.
|
||||
/// Obsolete: Use <see cref="NetworkConnection.Send{T}(T msg, int channelId = Channels.DefaultReliable)"/> instead.
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connection.Send(msg) instead.")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkConnection.Send<T>(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
|
||||
/// <summary>
|
||||
/// Send a message to the client which owns the given connection ID.
|
||||
/// <para>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.</para>
|
||||
/// Obsolete: Use <see cref="NetworkConnection.Send{T}(T msg, int channelId = Channels.DefaultReliable)"/> instead.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Message type</typeparam>
|
||||
/// <param name="connectionId">Client connection ID.</param>
|
||||
/// <param name="msg">Message struct to send</param>
|
||||
[Obsolete("Use connection.Send(msg) instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use connection.Send(msg) instead")]
|
||||
public static void SendToClient<T>(int connectionId, T msg) where T : IMessageBase
|
||||
{
|
||||
if (connections.TryGetValue(connectionId, out NetworkConnectionToClient conn))
|
||||
@ -674,6 +678,7 @@ public static void SendToClient<T>(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
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="SendToClientOfPlayer{T}(NetworkIdentity, T)"/> instead.
|
||||
/// </summary>
|
||||
@ -1150,6 +1155,7 @@ static bool VerifyCanSpawn(GameObject obj)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deprecated 11/23/2019
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="Spawn(GameObject, GameObject)"/> instead.
|
||||
/// </summary>
|
||||
@ -1160,6 +1166,7 @@ public static bool SpawnWithClientAuthority(GameObject obj, GameObject player)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deprecated 11/23/2019
|
||||
/// <summary>
|
||||
/// This spawns an object like NetworkServer.Spawn() but also assigns Client Authority to the specified client.
|
||||
/// <para>This is the same as calling NetworkIdentity.AssignClientAuthority on the spawned object.</para>
|
||||
@ -1184,20 +1191,22 @@ public static void Spawn(GameObject obj, GameObject player)
|
||||
Spawn(obj, identity.connectionToClient);
|
||||
}
|
||||
|
||||
// Deprecated 11/23/2019
|
||||
/// <summary>
|
||||
/// Use <see cref="Spawn(GameObject, NetworkConnection)"/> instead
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// Use <see cref="Spawn(GameObject, Guid, NetworkConnection)"/> instead
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// Obsolete: Use <see cref="NetworkIdentity.spawned"/> instead.
|
||||
/// </summary>
|
||||
|
@ -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<T>(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<T>(this NetworkWriter writer, T msg) where T : IMessageBase
|
||||
{
|
||||
WriteMessage(writer, msg);
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,8 @@ public class SyncListBool : SyncList<bool>
|
||||
}
|
||||
|
||||
// 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<MyStruct> instead")]
|
||||
public class SyncListSTRUCT<T> : SyncList<T> 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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -157,6 +157,8 @@ public virtual void ClientConnect(Uri uri)
|
||||
/// <summary>
|
||||
/// Deprecated: Use ServerGetClientAddress(int connectionId) instead
|
||||
/// </summary>
|
||||
// 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)
|
||||
{
|
||||
|
@ -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<T> with no message id instead")]
|
||||
public enum MsgType : short
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user