com.unity.netcode.gameobjects@1.5.2
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). ## [1.5.2] - 2023-07-24 ### Added ### Fixed - Fixed issue where `NetworkClient.OwnedObjects` was not returning any owned objects due to the `NetworkClient.IsConnected` not being properly set. (#2631) - Fixed a crash when calling TrySetParent with a null Transform (#2625) - Fixed issue where a `NetworkTransform` using full precision state updates was losing transform state updates when interpolation was enabled. (#2624) - Fixed issue where `NetworkObject.SpawnWithObservers` was not being honored for late joining clients. (#2623) - Fixed issue where invoking `NetworkManager.Shutdown` multiple times, depending upon the timing, could cause an exception. (#2622) - Fixed issue where removing ownership would not notify the server that it gained ownership. This also resolves the issue where an owner authoritative NetworkTransform would not properly initialize upon removing ownership from a remote client. (#2618) - Fixed ILPP issues when using CoreCLR and for certain dedicated server builds. (#2614) - Fixed an ILPP compile error when creating a generic NetworkBehaviour singleton with a static T instance. (#2603) ### Changed
This commit is contained in:
@@ -18,8 +18,6 @@ namespace Unity.Netcode
|
||||
Server = 1,
|
||||
Client = 2
|
||||
}
|
||||
|
||||
|
||||
// NetworkBehaviourILPP will override this in derived classes to return the name of the concrete type
|
||||
internal virtual string __getTypeName() => nameof(NetworkBehaviour);
|
||||
|
||||
@@ -98,7 +96,6 @@ namespace Unity.Netcode
|
||||
}
|
||||
|
||||
bufferWriter.Dispose();
|
||||
|
||||
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
||||
if (NetworkManager.__rpc_name_table.TryGetValue(rpcMethodId, out var rpcMethodName))
|
||||
{
|
||||
@@ -230,7 +227,6 @@ namespace Unity.Netcode
|
||||
}
|
||||
|
||||
bufferWriter.Dispose();
|
||||
|
||||
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
||||
if (NetworkManager.__rpc_name_table.TryGetValue(rpcMethodId, out var rpcMethodName))
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Unity.Netcode
|
||||
m_NetworkManager.NetworkTickSystem.Tick -= NetworkBehaviourUpdater_Tick;
|
||||
}
|
||||
|
||||
// TODO 2023-Q2: Order of operations requires NetworkVariable updates first then showing NetworkObjects
|
||||
// Order of operations requires NetworkVariable updates first then showing NetworkObjects
|
||||
private void NetworkBehaviourUpdater_Tick()
|
||||
{
|
||||
// First update NetworkVariables
|
||||
|
||||
@@ -59,13 +59,12 @@ namespace Unity.Netcode
|
||||
// Metrics update needs to be driven by NetworkConnectionManager's update to assure metrics are dispatched after the send queue is processed.
|
||||
MetricsManager.UpdateMetrics();
|
||||
|
||||
// TODO 2023-Q2: Determine a better way to handle this
|
||||
// TODO: Determine a better way to handle this
|
||||
NetworkObject.VerifyParentingStatus();
|
||||
|
||||
// This is "ok" to invoke when not processing messages since it is just cleaning up messages that never got handled within their timeout period.
|
||||
DeferredMessageManager.CleanupStaleTriggers();
|
||||
|
||||
// TODO 2023-Q2: Determine a better way to handle this
|
||||
if (m_ShuttingDown)
|
||||
{
|
||||
ShutdownInternal();
|
||||
@@ -834,9 +833,7 @@ namespace Unity.Netcode
|
||||
}
|
||||
|
||||
ConnectionManager.LocalClient.SetRole(true, true, this);
|
||||
|
||||
Initialize(true);
|
||||
|
||||
try
|
||||
{
|
||||
IsListening = NetworkConfig.NetworkTransport.StartServer();
|
||||
@@ -942,10 +939,16 @@ namespace Unity.Netcode
|
||||
if (IsServer || IsClient)
|
||||
{
|
||||
m_ShuttingDown = true;
|
||||
MessageManager.StopProcessing = discardMessageQueue;
|
||||
if (MessageManager != null)
|
||||
{
|
||||
MessageManager.StopProcessing = discardMessageQueue;
|
||||
}
|
||||
}
|
||||
|
||||
NetworkConfig.NetworkTransport.OnTransportEvent -= ConnectionManager.HandleNetworkEvent;
|
||||
if (NetworkConfig != null && NetworkConfig.NetworkTransport != null)
|
||||
{
|
||||
NetworkConfig.NetworkTransport.OnTransportEvent -= ConnectionManager.HandleNetworkEvent;
|
||||
}
|
||||
}
|
||||
|
||||
// Ensures that the NetworkManager is cleaned up before OnDestroy is run on NetworkObjects and NetworkBehaviours when unloading a scene with a NetworkManager
|
||||
@@ -1029,6 +1032,8 @@ namespace Unity.Netcode
|
||||
// Ensures that the NetworkManager is cleaned up before OnDestroy is run on NetworkObjects and NetworkBehaviours when quitting the application.
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
// Make sure ShutdownInProgress returns true during this time
|
||||
m_ShuttingDown = true;
|
||||
OnDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -733,6 +733,12 @@ namespace Unity.Netcode
|
||||
/// <returns>Whether or not reparenting was successful.</returns>
|
||||
public bool TrySetParent(Transform parent, bool worldPositionStays = true)
|
||||
{
|
||||
// If we are removing ourself from a parent
|
||||
if (parent == null)
|
||||
{
|
||||
return TrySetParent((NetworkObject)null, worldPositionStays);
|
||||
}
|
||||
|
||||
var networkObject = parent.GetComponent<NetworkObject>();
|
||||
|
||||
// If the parent doesn't have a NetworkObjet then return false, otherwise continue trying to parent
|
||||
@@ -1192,7 +1198,6 @@ namespace Unity.Netcode
|
||||
{
|
||||
NetworkLog.LogError($"{nameof(NetworkBehaviour)} index {index} was out of bounds for {name}. NetworkBehaviours must be the same, and in the same order, between server and client.");
|
||||
}
|
||||
|
||||
if (NetworkLog.CurrentLogLevel <= LogLevel.Developer)
|
||||
{
|
||||
var currentKnownChildren = new System.Text.StringBuilder();
|
||||
@@ -1205,7 +1210,6 @@ namespace Unity.Netcode
|
||||
}
|
||||
NetworkLog.LogInfo(currentKnownChildren.ToString());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user