MsgType
enumeration was removed. All message types are generated dynamically. Use Send
instead.oldValue
and newValue
SyncListString
was replaced by SyncList<string>
.SyncListFloat
was replaced by SyncList<float>
.SyncListInt
was replaced by SyncList<int>
.SyncListUInt
was replaced by SyncList<uint>
.SyncListBool
was replaced by SyncList<bool>
.OP_REMOVE
was replaced by OP_REMOVEAT
OP_DIRTY
was replaced by OP_SET
OP_DIRTY
was replaced by OP_SET
Flush
- Use ClearChanges
instead.Channels.Reliable = 0
Channels.Unreliable = 1
NetworkConnection
was replaced by NetworkConnectionToClient
in many places.networkPort
Removed as part of separating Transports to components. Not all transports use ports, but those that do have a field for it. See Transports for more info.IsHeadless()
Use compiler symbol UNITY_SERVER
instead.ConfigureServerFrameRate
was renamed to ConfigureHeadlessFrameRate
.client
Use NetworkClient directly, it will be made static soon. For example, use NetworkClient.Send(message)
instead of NetworkManager.client.Send(message)
.IsClientConnected()
Use static property NetworkClient.isConnected
instead.onlineScene
and offlineScene
These store full paths now, so use SceneManager.GetActiveScene().path instead.OnStartClient(NetworkClient client)
Override OnStartClient() instead since all NetworkClient
methods are static now.OnClientChangeScene(string newSceneName)
Override OnClientChangeScene(string newSceneName, SceneOperation sceneOperation, bool customHandling)
instead.OnClientChangeScene(string newSceneName, SceneOperation sceneOperation)
Override OnClientChangeScene(string newSceneName, SceneOperation sceneOperation, bool customHandling)
instead.OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage extraMessage)
Override OnServerAddPlayer(NetworkConnection conn)
instead. See Custom Player Spawn Guide for details.OnServerRemovePlayer(NetworkConnection conn, NetworkIdentity player)
Use NetworkServer.RemovePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority = false)
instead.OnServerError(NetworkConnection conn, int errorCode)
OnServerError(NetworkConnection conn, Exception exception)
.OnClientError(NetworkConnection conn, int errorCode)
OnClientError(Exception exception)
.disconnectInactiveConnections
and disconnectInactiveTimeout
were removed.NetworkConnection
parameter. Remove the parameter from your overrides and use NetworkClient.connection
in your code instead.showGUI
was removed.NetworkConnection
was replaced by NetworkConnectionToClient
in many places.OnRoomServerCreateGamePlayer(NetworkConnection conn)
Use OnRoomServerCreateGamePlayer(NetworkConnection conn, GameObject roomPlayer)
instead.OnRoomServerSceneLoadedForPlayer(GameObject roomPlayer, GameObject gamePlayer)
Use OnRoomServerSceneLoadedForPlayer(NetworkConnection conn, GameObject roomPlayer, GameObject gamePlayer)
instead.NetworkConnection
parameter.NetworkClient.connection
within your overrides.clientAuthorityOwner
Use connectionToClient insteadGetSceneIdenity
Use GetSceneIdentity
instead (typo in original name)RemoveClientAuthority(NetworkConnection conn)
NetworkConnection parameter is no longer needed and nothing is returnedspawned
dictionaryNetworkServer.spawned
and NetworkClient.spawned
dictionaries.NetworkConnection
was replaced by NetworkConnectionToClient
in many places.sendInterval
attribute
Use NetworkBehaviour.syncInterval
field instead. Can be modified in the Inspector too.List m_SyncObjects
Use List syncObjects
instead.OnSetLocalVisibility(bool visible)
Override OnSetHostVisibility(bool visible)
instead.OnRebuildObservers
, OnCheckObserver
, and OnSetHostVisibility
were moved to a separate class called NetworkVisibility
NetworkBehaviour.OnNetworkDestroy
was renamed to NetworkBehaviour.OnStopClient
.getSyncVarHookGuard
renamed to GetSyncVarHookGuard
.setSyncVarHookGuard
- renamed to SetSyncVarHookGuard
.SetDirtyBit
- Use SetSyncVarDirtyBit
instead.[Command]
attribute parameter ignoreAuthority
replaced with requiresAuthority
.[ClientRpc]
attribute parameter includeOwner
replace with excludeOwner
.hostId
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.isConnected
Removed because it's pointless. A NetworkConnection
is always connected.InvokeHandlerNoData(int msgType)
Use InvokeHandler
instead.playerController
renamed to identity
since that's what it is: the NetworkIdentity
for the connection.RegisterHandler(short msgType, NetworkMessageDelegate handler)
Use NetworkServer.RegisterHandler()
or NetworkClient.RegisterHandler()
instead.UnregisterHandler(short msgType)
Use NetworkServer.UnregisterHandler()
or NetworkClient.UnregisterHandler()
instead.Send(int msgType, MessageBase msg, int channelId = Channels.Reliable)
Use Send(msg, channelId)
instead.NetworkConnection
was replaced by NetworkConnectionToClient
in many places.FindLocalObject(uint netId)
Use NetworkServer.spawned[netId].gameObject
instead.RegisterHandler(int msgType, NetworkMessageDelegate handler)
Use RegisterHandler(T msg)
instead.RegisterHandler(MsgType msgType, NetworkMessageDelegate handler)
Use RegisterHandler(T msg)
instead.RegisterHandler(Action handler, bool requireAuthentication = true)
RegisterHandler(Action<NetworkConnection, T), requireAuthentication = true)
instead.UnregisterHandler(int msgType)
Use UnregisterHandler(T msg)
instead.UnregisterHandler(MsgType msgType)
Use UnregisterHandler(T msg)
instead.SendToAll(int msgType, MessageBase msg, int channelId = Channels.Reliable)
Use SendToAll(T msg, int channelId = Channels.Reliable)
instead.SendToClient(int connectionId, int msgType, MessageBase msg)
Use NetworkConnection.Send(T msg, int channelId = Channels.Reliable)
instead.SendToClient(int connectionId, T msg)
Use NetworkConnection.Send(T msg, int channelId = Channels.Reliable)
instead.SendToClientOfPlayer(NetworkIdentity identity, int msgType, MessageBase msg)
Use identity.connectionToClient.Send<T>(T message, int channelId = Channels.Reliable)
instead.SendToReady(NetworkIdentity identity, short msgType, MessageBase msg, int channelId = Channels.Reliable)
Use identity.connectionToClient.Send()
instead.SendToReady(NetworkIdentity identity, T message, bool includeOwner = true, int channelId = Channels.Reliable)
SendToReadyObservers
.SpawnWithClientAuthority(GameObject obj, GameObject player)
Use Spawn(GameObject obj, GameObject player)
instead.SpawnWithClientAuthority(GameObject obj, NetworkConnection ownerConnection)
Use Spawn(GameObject obj, NetworkConnection ownerConnection)
instead.SpawnWithClientAuthority(GameObject obj, Guid assetId, NetworkConnection ownerConnection)
Use Spawn(GameObject obj, Guid assetId, NetworkConnection ownerConnection)
instead.disconnectInactiveConnections
and disconnectInactiveTimeout
were removed.NoConnections
was renamed to NoExternalConnections
.DisconnectAllExternalConnections
/ DisconnectAllConnections
DisconnectAll
instead.NetworkClient singleton
Use NetworkClient
directly. Singleton isn't needed anymore as all functions are static now.
Example: NetworkClient.Send(message)
instead of NetworkClient.singleton.Send(message)
.allClients
Use NetworkClient
directly instead. There is always exactly one client.GetRTT()
Use NetworkTime.rtt
instead.readyConnection
connection
instead.isLocalClient
isHostClient
instead.DisconnectLocalServer()
NetworkClient.Disconnect()
instead.RegisterHandler(int msgType, NetworkMessageDelegate handler)
Use RegisterHandler(T msg)
instead.RegisterHandler(MsgType msgType, NetworkMessageDelegate handler)
Use RegisterHandler(T msg)
instead.RegisterHandler(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
RegisterHandler(Action<T> handler, bool requireAuthentication = true)
instead.UnregisterHandler(int msgType)
Use UnregisterHandler(T msg)
instead.UnregisterHandler(MsgType msgType)
Use UnregisterHandler(T msg)
instead.Ready(NetworkConnection conn)
Ready()
without the NetworkConnection
parameter instead.Send(short msgType, MessageBase msg)
Use Send(T msg, int channelId = Channels.Reliable)
with no message id insteadShutdownAll()
Use Shutdown()
instead. There is only one client.NetworkClient
.NetworkConnection
was replaced by NetworkConnectionToClient
in many places.OnClientAuthenticate
no longer takes a NetworkConnection
parameter.
Use NetworkClient.connection
as needed.OnClientAuthenticated
event no longer takes a NetworkConnection
parameter.
Use NetworkClient.connection
as needed.NetworkConnection
is no longer used in client message handlers.NetworkClient.connection
within your handlers instead.ClientAccept
and ClientReject
no longer needs a NetworkConnection
parameter.NetworkTime.timeVar
was renamed to timeVariance
.NetworkTime.timeSd
was renamed to timeStandardDeviation
.NetworkTime.rttVar
was renamed to rttVariance
.NetworkTime.rttSd
was renamed to rttStandardDeviation
.StringMessage
ByteMessage
BytesMessage
IntegerMessage
DoubleMessage
EmptyMessage
Read(byte[] buffer, int offset, int count)
Use ReadBytes
instead.ReadPackedInt32(int value)
Use ReadInt32(int value)
instead.ReadPackedUInt32(uint value)
Use ReadUInt32(uint value)
instead.ReadPackedUInt64(ulong value)
Use ReadUInt64(ulong value)
instead.ReadBoolean
renamed to ReadBool
.ReadInt16
renamed to ReadShort
.ReadInt32
renamed to ReadInt
.Readint64
renamed to ReadLong
.ReadSingle
renamed to ReadFloat
.Write(bool value)
Use WriteBool
instead.Write(byte value)
Use WriteByte
instead.Write(sbyte value)
Use WriteSByte
instead.Write(short value)
Use WriteShort
instead.Write(ushort value)
Use WriteUShort
instead.Write(int value)
Use WriteInt
instead.Write(uint value)
Use WriteUInt
instead.Write(long value)
Use WriteLong
instead.Write(ulong value)
Use WriteULong
instead.Write(float value)
Use WriteFloat
instead.Write(double value)
Use WriteDouble
instead.Write(decimal value)
Use WriteDecimal
instead.Write(string value)
Use WriteString
instead.Write(char value)
Use WriteChar
instead.Write(Vector2 value)
Use WriteVector2
instead.Write(Vector2Int value)
Use WriteVector2Int
instead.Write(Vector3 value)
Use WriteVector3
instead.Write(Vector3Int value)
Use WriteVector3Int
instead.Write(Vector4 value)
Use WriteVector4
instead.Write(Color value)
Use WriteColor
instead.Write(Color32 value)
Use WriteColor32
instead.Write(Guid value)
Use WriteGuid
instead.Write(Transform value)
Use WriteTransform
instead.Write(Quaternion value)
Use WriteQuaternion
instead.Write(Rect value)
Use WriteRect
instead.Write(Plane value)
Use WritePlane
instead.Write(Ray value)
Use WriteRay
instead.Write(Matrix4x4 value)
Use WriteMatrix4x4
instead.Write(NetworkIdentity value)
Use WriteNetworkIdentity
instead.Write(GameObject value)
Use WriteGameObject
instead.Write(byte[] buffer, int offset, int count)
Use WriteBytes
instead.WritePackedInt32(int value)
Use WriteInt32(int value)
insteadWritePackedUInt32(uint value)
Use WriteUInt32(uint value)
insteadWritePackedUInt64(ulong value)
Use WriteUInt64(ulong value)
insteadRemoteProcedureCalls
.CmdDelegate
renamed to RemoteCallDelegate
.MirrorInvokeType
renamed to RemoteCallType
.GetConnectionInfo(int connectionId, out string address)
Use ServerGetClientAddress(int connectionId)
instead.GetMaxBatchSize
renamed to GetMaxPacketSize
.ClientSend(int channelId, ArraySegment segment)
ClientSend(segment, channelId)
instead.ServerSend(int connectionId, int channelId, ArraySegment segment)
ServerSend(connectionId, segment, channelId)
instead.MaxMessageSize
Use MaxMessageSizeFromClient
or MaxMessageSizeFromServer
instead.Version
enum removed.DefaultReliable
renamed to Reliable
.DefaultUnreliable
renamed to Unreliable
.