Search Issue Tracker
Fixed
Fixed in netcode-gameobjects-1.12.0
Votes
0
Found in [Package]
netcode-gameobjects-1.9.1
Issue ID
MTTB-374
Regression
No
[GH-3017] Could you remove that function from Netcode scripts or disable it in playmode?
[https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/3017]
Steps to reproduce:
There is a script in Netcode that makes my project lag a lot when playing from the Editor.
It's an editor script that just send some kind of Warning but it makes the whole game lag.
I did a post with more details here:
[https://discussions.unity.com/t/performance-spike-because-of-a-netcode-networkmanagerhelper-editor-script-any-way-to-disable-that/1505627]
But basically it's its NetworkManagerHelper.cs this function
{code:java}
private static void EditorApplication_hierarchyChanged()
{
var allNetworkManagers = Resources.FindObjectsOfTypeAll<NetworkManager>();
foreach (var networkManager in allNetworkManagers)
{
if (!networkManager.NetworkManagerCheckForParent())
{
Singleton.CheckAndNotifyUserNetworkObjectRemoved(networkManager);
}
}
} {code}
I have a large scene with a lot of gameobjects, most have their scripts/components disabled so the performances are very good in the build. It's just that this function makes the game unplayable from the editor.
Maybe just add this at the start of the function?
{code:java}
if(Application.isPlaying)
return; {code}
I could edit it myself, its just that this requires copying netcode script in the project instead of using the package manager, and makes updating version more complex.
Actual results:
lag when entering playmode with large scene (A lot of gameobjects)
Expected results:
No lag when entering playmode with large scene (A lot of gameobjects)
Reproducible with versions:
NGO: 1.x ?
Not reproducible with versions:
Can’t test with versions:
Tested on (OS):
Notes:
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment