Skip to content

feat: Remove Simulator Tools window #1793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all 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.adapter.utp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ All notable changes to this package will be documented in this file. The format
- Fixed compilation on WebGL. Note that the platform is still unsupported, but at least including the package in a WebGL project will not create compilation errors anymore. (#1802)
- Flush internal send queues to the network during `Shutdown`. Prior to this fix, calling `NetworkManager.Shutdown` with `discardMessageQueue` set to false would not actually get messages from the outgoing queue to the network. (#1800)

### Changed

- Removed the 'NetCode > Simulator Tools' menu to reduce confusion. The only way to set debug simulator parameters is now through the 'Debug Simulator' section of the 'Unity Transport' component. (#1793)

## [1.0.0-pre.6] - 2022-03-02

### Added
Expand Down
8 changes: 0 additions & 8 deletions com.unity.netcode.adapter.utp/Editor.meta

This file was deleted.

60 changes: 0 additions & 60 deletions com.unity.netcode.adapter.utp/Editor/MultiplayerWindow.cs

This file was deleted.

11 changes: 0 additions & 11 deletions com.unity.netcode.adapter.utp/Editor/MultiplayerWindow.cs.meta

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 3 additions & 14 deletions com.unity.netcode.adapter.utp/Runtime/UnityTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,23 +1030,12 @@ public override void Shutdown()

private void ConfigureSimulator()
{
#if UNITY_EDITOR
// Backward-compatibility with how we used to handle simulator parameters.
var packetDelay = UnityEditor.EditorPrefs.GetInt($"NetcodeGameObjects_{Application.productName}_ClientDelay", DebugSimulator.PacketDelayMS);
var packetJitter = UnityEditor.EditorPrefs.GetInt($"NetcodeGameObjects_{Application.productName}_ClientJitter", DebugSimulator.PacketJitterMS);
var dropRate = UnityEditor.EditorPrefs.GetInt($"NetcodeGameObjects_{Application.productName}_ClientDropRate", DebugSimulator.PacketDropRate);
#else
var packetDelay = DebugSimulator.PacketDelayMS;
var packetJitter = DebugSimulator.PacketJitterMS;
var dropRate = DebugSimulator.PacketDropRate;
#endif

m_NetworkSettings.WithSimulatorStageParameters(
maxPacketCount: 300, // TODO Is there any way to compute a better value?
maxPacketSize: NetworkParameterConstants.MTU,
packetDelayMs: packetDelay,
packetJitterMs: packetJitter,
packetDropPercentage: dropRate
packetDelayMs: DebugSimulator.PacketDelayMS,
packetJitterMs: DebugSimulator.PacketJitterMS,
packetDropPercentage: DebugSimulator.PacketDropRate
);
}

Expand Down