File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
com.unity.netcode.gameobjects Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
1212
1313### Fixed
1414
15+ - Fixed issue where the ` NetworkManagerHelper ` was continuing to check for hierarchy changes when in play mode. (#3027 )
16+
1517### Changed
1618
1719## [ 1.11.0] - 2024-08-20
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ private static void EditorApplication_playModeStateChanged(PlayModeStateChange p
6161 {
6262 s_LastKnownNetworkManagerParents . Clear ( ) ;
6363 ScenesInBuildActiveSceneCheck ( ) ;
64+ EditorApplication . hierarchyChanged -= EditorApplication_hierarchyChanged ;
65+ break ;
66+ }
67+ case PlayModeStateChange . EnteredEditMode :
68+ {
69+ EditorApplication . hierarchyChanged += EditorApplication_hierarchyChanged ;
6470 break ;
6571 }
6672 }
@@ -110,6 +116,12 @@ private static void ScenesInBuildActiveSceneCheck()
110116 /// </summary>
111117 private static void EditorApplication_hierarchyChanged ( )
112118 {
119+ if ( Application . isPlaying )
120+ {
121+ EditorApplication . hierarchyChanged -= EditorApplication_hierarchyChanged ;
122+ return ;
123+ }
124+
113125 var allNetworkManagers = Resources . FindObjectsOfTypeAll < NetworkManager > ( ) ;
114126 foreach ( var networkManager in allNetworkManagers )
115127 {
You can’t perform that action at this time.
0 commit comments