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
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
Add comment