You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes the issue with double lerping by providing two types of
interpolators to select from while also exposing the
`MaximumInterpolationTime` for each respective interpolator type. Smooth
Dampening is added as an alternative to using lerp for each respective
interpolator (position, rotation, and scale).
This PR includes a few new additions:
- Additional updates to the inspector view which allows for interpolator
type selection and if available additional properties associated with
the interpolator.




- A new `NetworkTimeSystem.TickLatency` property that provides the
average latency of a client.
- An new `NetworkTime.FixedDeltaTimeAsDouble` property that returns a
`double` version of the `NetworkTime.FixedDeltaTime`.
This PR also starts the deprecation process for
`BufferedLinearInterpolator<T>.Update(float deltaTime, NetworkTime
serverTime)` as this method is only for internal testing purposes.
[MTTB-539](https://jira.unity3d.com/browse/MTTB-539)
[MTT-11338](https://jira.unity3d.com/browse/MTT-11338) -- Fixing
disabled tests
fix: #3112close: #3112
## Changelog
- Added: Interpolator types as an inspector view selection for position,
rotation, and scale.
- Added: A new smooth dampening interpolator type that provides a nice
balance between precision and smoothing results.
- Added: `NetworkTimeSystem.TickLatency` property that provides the
average latency of a client.
- Fixed: Issue where the `MaximumInterpolationTime` could not be
modified from within the inspector view or runtime.
- Changed: `BufferedLinearInterpolator<T>.Update(float deltaTime,
NetworkTime serverTime)` as being deprecated since this method is only
used for internal testing purposes.
## Testing and Documentation
- Includes integration test updates:
- `InterpolatorTests` was updated to changes and two disabled tests were
refactored and re-enabled.
- `NetworkTransformGeneral` includes additional TestFixture passes using
Smooth Dampening.
- `NetworktTransformTests` includes additional TestFixture passes using
Smooth Dampening.
- `NestedNetworkTransformTests` includes additional TestFixture passes
using Smooth Dampening.
- Includes updates and additions to public documentation
([PR-1443](Unity-Technologies/com.unity.multiplayer.docs#1443))
<!-- Uncomment and mark items off with a * if this PR deprecates any
API:
### Deprecated API
- [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter
yyyy-mm-dd)` entry.
- [ ] An [api updater] was added.
- [ ] Deprecation of the API is explained in the CHANGELOG.
- [ ] The users can understand why this API was removed and what they
should use instead.
-->
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,15 @@ Additional documentation and release notes are available at [Multiplayer Documen
10
10
11
11
### Added
12
12
13
+
- Added interpolator types as an inspector view selection for position, rotation, and scale. (#3337)
14
+
- Added a new smooth dampening interpolator type that provides a nice balance between precision and smoothing results. (#3337)
15
+
- Added `NetworkTimeSystem.TickLatency` property that provides the average latency of a client. (#3337)
13
16
- Added `FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator)` constructor that uses the `ArraySegment.Offset` as the `FastBufferReader` offset and the `ArraySegment.Count` as the `FastBufferReader` length. (#3321)
14
17
- Added `FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator, int length = -1)` constructor that uses the `ArraySegment.Offset` as the `FastBufferReader` offset. (#3321)
15
18
16
19
### Fixed
17
20
21
+
- Fixed issue where the `MaximumInterpolationTime` could not be modified from within the inspector view or runtime. (#3337)
18
22
- Fixed `ChangeOwnership` changing ownership to clients that are not observers. This also happened with automated object distribution. (#3323)
19
23
- Fixed issue where `AnticipatedNetworkVariable` previous value returned by `AnticipatedNetworkVariable.OnAuthoritativeValueChanged` is updated correctly on the non-authoritative side. (#3306)
20
24
- Fixed `OnClientConnectedCallback` passing incorrect `clientId` when scene management is disabled. (#3312)
@@ -31,6 +35,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
31
35
32
36
### Changed
33
37
38
+
- Changed `BufferedLinearInterpolator<T>.Update(float deltaTime, NetworkTime serverTime)` as being deprecated since this method is only used for internal testing purposes. (#3337)
34
39
- Ensured that a useful error is thrown when attempting to build a dedicated server with Unity Transport that uses websockets. (#3336)
35
40
- Changed root in-scene placed `NetworkObject` instances now will always have either the `Distributable` permission set unless the `SessionOwner` permission is set. (#3305)
36
41
- Changed the `DestroyObject` message to reduce the serialized message size and remove the unnecessary message field. (#3304)
/// Will end the current indention level when drawing propery fields.
67
+
/// </summary>
68
+
/// <remarks>
69
+
/// For additional information:<br />
70
+
/// - <see cref="BeginIndent"/><br />
71
+
/// - <see cref="DrawPropertyField"/><br />
72
+
/// </remarks>
73
+
privateprotectedvoidEndIndent()
74
+
{
75
+
if(m_IndentLevel==0)
76
+
{
77
+
Debug.LogWarning($"Invoking {nameof(EndIndent)} when the indent level is already 0!");
78
+
return;
79
+
}
80
+
m_IndentLevel--;
81
+
GUILayout.EndVertical();
82
+
GUILayout.EndHorizontal();
83
+
}
84
+
19
85
/// <summary>
20
86
/// Helper method to draw the properties of the specified child type <typeparamref name="T"/> component within a FoldoutHeaderGroup.
21
87
/// </summary>
22
-
/// <typeparam name="T">The specific child type that should have its properties drawn.</typeparam>
88
+
/// <remarks>
89
+
/// <see cref="T"/> must be a sub-class of the root parent class type <see cref="TT"/>.
90
+
/// </remarks>
91
+
/// <typeparam name="T">The specific child derived type of <see cref="TT"/> or the type of <see cref="TT"/> that should have its properties drawn.</typeparam>
23
92
/// <param name="type">The component type of the <see cref="UnityEditor.Editor.target"/>.</param>
24
93
/// <param name="displayProperties">The <see cref="Action"/> to invoke that will draw the type <typeparamref name="T"/> properties.</param>
25
94
/// <param name="expanded">The <typeparamref name="T"/> current expanded property value</param>
0 commit comments