com.unity.netcode.gameobjects@2.0.0-pre.3
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). ## [2.0.0-pre.3] - 2024-07-23 ### Added - Added: `UnityTransport.GetNetworkDriver` and `UnityTransport.GetLocalEndpoint` methods to expose the driver and local endpoint being used. (#2978) ### Fixed - Fixed issue where deferred despawn was causing GC allocations when converting an `IEnumerable` to a list. (#2983) - Fixed issue where the realtime network stats monitor was not able to display RPC traffic in release builds due to those stats being only available in development builds or the editor. (#2979) - Fixed issue where `NetworkManager.ScenesLoaded` was not being updated if `PostSynchronizationSceneUnloading` was set and any loaded scenes not used during synchronization were unloaded. (#2971) - Fixed issue where `Rigidbody2d` under Unity 6000.0.11f1 has breaking changes where `velocity` is now `linearVelocity` and `isKinematic` is replaced by `bodyType`. (#2971) - Fixed issue where `NetworkSpawnManager.InstantiateAndSpawn` and `NetworkObject.InstantiateAndSpawn` were not honoring the ownerClientId parameter when using a client-server network topology. (#2968) - Fixed issue where internal delta serialization could not have a byte serializer defined when serializing deltas for other types. Added `[GenerateSerializationForType(typeof(byte))]` to both the `NetworkVariable` and `AnticipatedNetworkVariable` classes to assure a byte serializer is defined.(#2962) - Fixed issue when scene management was disabled and the session owner would still try to synchronize a late joining client. (#2962) - Fixed issue when using a distributed authority network topology where it would allow a session owner to spawn a `NetworkObject` prior to being approved. Now, an error message is logged and the `NetworkObject` will not be spawned prior to the client being approved. (#2962) - Fixed issue where attempting to spawn during `NetworkBehaviour.OnInSceneObjectsSpawned` and `NetworkBehaviour.OnNetworkSessionSynchronized` notifications would throw a collection modified exception. (#2962) ### Changed - Changed logic where clients can now set the `NetworkSceneManager` client synchronization mode when using a distributed authority network topology. (#2985)
This commit is contained in:
@@ -360,6 +360,10 @@ namespace Unity.Netcode.Components
|
||||
|
||||
public override void OnNetworkSpawn()
|
||||
{
|
||||
if (NetworkManager.DistributedAuthorityMode)
|
||||
{
|
||||
Debug.LogWarning($"This component is not currently supported in distributed authority.");
|
||||
}
|
||||
base.OnNetworkSpawn();
|
||||
m_OutstandingAuthorityChange = true;
|
||||
ApplyAuthoritativeState();
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Unity.Netcode.Components
|
||||
/// Half float precision <see cref="Vector3"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The Vector3T<ushort> values are half float values returned by <see cref="Mathf.FloatToHalf(float)"/> for each
|
||||
/// The Vector3T<ushort> values are half float values returned by <see cref="Mathf.FloatToHalf(float)"/> for each
|
||||
/// individual axis and the 16 bits of the half float are stored as <see cref="ushort"/> values since C# does not have
|
||||
/// a half float type.
|
||||
/// </remarks>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Unity.Netcode.Components
|
||||
/// Half Precision <see cref="Vector4"/> that can also be used to convert a <see cref="Quaternion"/> to half precision.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The Vector4T<ushort> values are half float values returned by <see cref="Mathf.FloatToHalf(float)"/> for each
|
||||
/// The Vector4T<ushort> values are half float values returned by <see cref="Mathf.FloatToHalf(float)"/> for each
|
||||
/// individual axis and the 16 bits of the half float are stored as <see cref="ushort"/> values since C# does not have
|
||||
/// a half float type.
|
||||
/// </remarks>
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace Unity.Netcode
|
||||
{
|
||||
/// <summary>
|
||||
/// Solves for incoming values that are jittered
|
||||
/// Solves for incoming values that are jittered.
|
||||
/// Partially solves for message loss. Unclamped lerping helps hide this, but not completely
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of interpolated value</typeparam>
|
||||
|
||||
@@ -177,7 +177,11 @@ namespace Unity.Netcode.Components
|
||||
{
|
||||
if (m_IsRigidbody2D)
|
||||
{
|
||||
#if COM_UNITY_MODULES_PHYSICS2D_LINEAR
|
||||
m_Rigidbody2D.linearVelocity = linearVelocity;
|
||||
#else
|
||||
m_Rigidbody2D.velocity = linearVelocity;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,7 +201,11 @@ namespace Unity.Netcode.Components
|
||||
{
|
||||
if (m_IsRigidbody2D)
|
||||
{
|
||||
#if COM_UNITY_MODULES_PHYSICS2D_LINEAR
|
||||
return m_Rigidbody2D.linearVelocity;
|
||||
#else
|
||||
return m_Rigidbody2D.velocity;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -238,7 +246,7 @@ namespace Unity.Netcode.Components
|
||||
{
|
||||
if (m_IsRigidbody2D)
|
||||
{
|
||||
return Vector3.forward * m_Rigidbody2D.velocity;
|
||||
return Vector3.forward * m_Rigidbody2D.angularVelocity;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -481,7 +489,7 @@ namespace Unity.Netcode.Components
|
||||
{
|
||||
if (m_IsRigidbody2D)
|
||||
{
|
||||
return m_Rigidbody2D.isKinematic;
|
||||
return m_Rigidbody2D.bodyType == RigidbodyType2D.Kinematic;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -510,7 +518,7 @@ namespace Unity.Netcode.Components
|
||||
{
|
||||
if (m_IsRigidbody2D)
|
||||
{
|
||||
m_Rigidbody2D.isKinematic = isKinematic;
|
||||
m_Rigidbody2D.bodyType = isKinematic ? RigidbodyType2D.Kinematic : RigidbodyType2D.Dynamic;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -715,7 +723,11 @@ namespace Unity.Netcode.Components
|
||||
|
||||
if (zeroVelocity)
|
||||
{
|
||||
#if COM_UNITY_MODULES_PHYSICS2D_LINEAR
|
||||
m_Rigidbody2D.linearVelocity = Vector2.zero;
|
||||
#else
|
||||
m_Rigidbody2D.velocity = Vector2.zero;
|
||||
#endif
|
||||
m_Rigidbody2D.angularVelocity = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -3535,7 +3535,7 @@ namespace Unity.Netcode.Components
|
||||
/// </summary>
|
||||
private void UpdateTransformState()
|
||||
{
|
||||
if (m_CachedNetworkManager.ShutdownInProgress || (m_CachedNetworkManager.DistributedAuthorityMode && m_CachedNetworkObject.Observers.Count - 1 == 0))
|
||||
if (m_CachedNetworkManager.ShutdownInProgress || (m_CachedNetworkManager.DistributedAuthorityMode && !m_CachedNetworkManager.CMBServiceConnection && m_CachedNetworkObject.Observers.Count - 1 == 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user