File tree 2 files changed +14
-0
lines changed
com.unity.netcode.gameobjects
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
12
12
13
13
### Fixed
14
14
15
+ - Fixed issue where the ` NetworkManagerHelper ` was continuing to check for hierarchy changes when in play mode. (#3027 )
16
+
15
17
### Changed
16
18
17
19
## [ 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
61
61
{
62
62
s_LastKnownNetworkManagerParents . Clear ( ) ;
63
63
ScenesInBuildActiveSceneCheck ( ) ;
64
+ EditorApplication . hierarchyChanged -= EditorApplication_hierarchyChanged ;
65
+ break ;
66
+ }
67
+ case PlayModeStateChange . EnteredEditMode :
68
+ {
69
+ EditorApplication . hierarchyChanged += EditorApplication_hierarchyChanged ;
64
70
break ;
65
71
}
66
72
}
@@ -110,6 +116,12 @@ private static void ScenesInBuildActiveSceneCheck()
110
116
/// </summary>
111
117
private static void EditorApplication_hierarchyChanged ( )
112
118
{
119
+ if ( Application . isPlaying )
120
+ {
121
+ EditorApplication . hierarchyChanged -= EditorApplication_hierarchyChanged ;
122
+ return ;
123
+ }
124
+
113
125
var allNetworkManagers = Resources . FindObjectsOfTypeAll < NetworkManager > ( ) ;
114
126
foreach ( var networkManager in allNetworkManagers )
115
127
{
You can’t perform that action at this time.
0 commit comments