Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Additional documentation and release notes are available at [Multiplayer Documen

## [Unreleased]

### Changed

- The debug simulator in `UnityTransport` is now non-deterministic. Its random number generator used to be seeded with a constant value, leading to the same pattern of packet drops, delays, and jitter in every run. (#2196)

### Fixed

- Fixed issue where `NetworkTransform` was not ending extrapolation for the previous state causing non-authoritative instances to become out of synch. (#2170)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public struct SimulatorParameters
PacketDropRate = 0
};

internal uint DebugSimulatorRandomSeed { get; set; } = 0;
internal uint? DebugSimulatorRandomSeed { get; set; } = null;

private struct PacketLossCache
{
Expand Down Expand Up @@ -1325,7 +1325,7 @@ private void ConfigureSimulator()
packetDelayMs: DebugSimulator.PacketDelayMS,
packetJitterMs: DebugSimulator.PacketJitterMS,
packetDropPercentage: DebugSimulator.PacketDropRate,
randomSeed: DebugSimulatorRandomSeed
randomSeed: DebugSimulatorRandomSeed ?? (uint)System.Diagnostics.Stopwatch.GetTimestamp()
#if UTP_TRANSPORT_2_0_ABOVE
, mode: ApplyMode.AllPackets
#endif
Expand Down