com.unity.netcode.gameobjects@1.0.1
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.0.1] - 2022-08-23 ### Changed - Changed version to 1.0.1. (#2131) - Updated dependency on `com.unity.transport` to 1.2.0. (#2129) - When using `UnityTransport`, _reliable_ payloads are now allowed to exceed the configured 'Max Payload Size'. Unreliable payloads remain bounded by this setting. (#2081) - Preformance improvements for cases with large number of NetworkObjects, by not iterating over all unchanged NetworkObjects ### Fixed - Fixed an issue where reading/writing more than 8 bits at a time with BitReader/BitWriter would write/read from the wrong place, returning and incorrect result. (#2130) - Fixed issue with the internal `NetworkTransformState.m_Bitset` flag not getting cleared upon the next tick advancement. (#2110) - Fixed interpolation issue with `NetworkTransform.Teleport`. (#2110) - Fixed issue where the authoritative side was interpolating its transform. (#2110) - Fixed Owner-written NetworkVariable infinitely write themselves (#2109) - Fixed NetworkList issue that showed when inserting at the very end of a NetworkList (#2099) - Fixed issue where a client owner of a `NetworkVariable` with both owner read and write permissions would not update the server side when changed. (#2097) - Fixed issue when attempting to spawn a parent `GameObject`, with `NetworkObject` component attached, that has one or more child `GameObject`s, that are inactive in the hierarchy, with `NetworkBehaviour` components it will no longer attempt to spawn the associated `NetworkBehaviour`(s) or invoke ownership changed notifications but will log a warning message. (#2096) - Fixed an issue where destroying a NetworkBehaviour would not deregister it from the parent NetworkObject, leading to exceptions when the parent was later destroyed. (#2091) - Fixed issue where `NetworkObject.NetworkHide` was despawning and destroying, as opposed to only despawning, in-scene placed `NetworkObject`s. (#2086) - Fixed `NetworkAnimator` synchronizing transitions twice due to it detecting the change in animation state once a transition is started by a trigger. (#2084) - Fixed issue where `NetworkAnimator` would not synchronize a looping animation for late joining clients if it was at the very end of its loop. (#2076) - Fixed issue where `NetworkAnimator` was not removing its subscription from `OnClientConnectedCallback` when despawned during the shutdown sequence. (#2074) - Fixed IsServer and IsClient being set to false before object despawn during the shutdown sequence. (#2074) - Fixed NetworkList Value event on the server. PreviousValue is now set correctly when a new value is set through property setter. (#2067) - Fixed NetworkLists not populating on client. NetworkList now uses the most recent list as opposed to the list at the end of previous frame, when sending full updates to dynamically spawned NetworkObject. The difference in behaviour is required as scene management spawns those objects at a different time in the frame, relative to updates. (#2062)
This commit is contained in:
@@ -10,21 +10,19 @@ namespace Unity.Netcode.RuntimeTests
|
||||
{
|
||||
public class TransformInterpolationObject : NetworkBehaviour
|
||||
{
|
||||
// Set the minimum threshold which we will use as our margin of error
|
||||
public const float MinThreshold = 0.001f;
|
||||
|
||||
public bool CheckPosition;
|
||||
public bool IsMoving;
|
||||
public bool IsFixed;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Since the local position is transformed from local to global and vice-versa on the server and client
|
||||
// it may accumulate some error. We allow an error of 0.01 over the range of 1000 used in this test.
|
||||
// This requires precision to 5 digits, so it doesn't weaken the test, while preventing spurious failures
|
||||
const float maxRoundingError = 0.01f;
|
||||
|
||||
// Check the position of the nested object on the client
|
||||
if (CheckPosition)
|
||||
{
|
||||
if (transform.position.y < -maxRoundingError || transform.position.y > 100.0f + maxRoundingError)
|
||||
if (transform.position.y < -MinThreshold || transform.position.y > 100.0f + MinThreshold)
|
||||
{
|
||||
Debug.LogError($"Interpolation failure. transform.position.y is {transform.position.y}. Should be between 0.0 and 100.0");
|
||||
}
|
||||
@@ -65,7 +63,8 @@ namespace Unity.Netcode.RuntimeTests
|
||||
protected override void OnServerAndClientsCreated()
|
||||
{
|
||||
m_PrefabToSpawn = CreateNetworkObjectPrefab("InterpTestObject");
|
||||
m_PrefabToSpawn.AddComponent<NetworkTransform>();
|
||||
var networkTransform = m_PrefabToSpawn.AddComponent<NetworkTransform>();
|
||||
networkTransform.PositionThreshold = TransformInterpolationObject.MinThreshold;
|
||||
m_PrefabToSpawn.AddComponent<TransformInterpolationObject>();
|
||||
}
|
||||
|
||||
@@ -85,8 +84,6 @@ namespace Unity.Netcode.RuntimeTests
|
||||
m_SpawnedObjectOnClient = s_GlobalNetworkObjects[clientId][m_SpawnedAsNetworkObject.NetworkObjectId];
|
||||
// make sure the objects are set with the right network manager
|
||||
m_SpawnedObjectOnClient.NetworkManagerOwner = m_ClientNetworkManagers[0];
|
||||
|
||||
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
|
||||
Reference in New Issue
Block a user