You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: NetworkSceneManager add do not load during callback note in xml documentation [MTT-3495] (#1974)
* update
xml documentation to be included in API documentation that one should not try to start a new scene event within a scene event notification callback.
* update
one more location just to make sure.
* Update com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs
Co-authored-by: Fatih Mar <[email protected]>
Co-authored-by: Fatih Mar <[email protected]>
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs
+17-7Lines changed: 17 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ namespace Unity.Netcode
12
12
/// delegate type <see cref="NetworkSceneManager.SceneEventDelegate"/> uses this class to provide
13
13
/// scene event status.<br/>
14
14
/// <em>Note: This is only when <see cref="NetworkConfig.EnableSceneManagement"/> is enabled.</em><br/>
15
+
/// <em>*** Do not start new scene events within scene event notification callbacks.</em><br/>
15
16
/// See also: <br/>
16
17
/// <seealso cref="SceneEventType"/>
17
18
/// </summary>
@@ -166,6 +167,7 @@ public class NetworkSceneManager : IDisposable
166
167
/// <item><term><see cref="OnUnloadComplete"/> Invoked only when an <see cref="SceneEventType.UnloadComplete"/> event is being processed</term></item>
167
168
/// <item><term><see cref="OnSynchronizeComplete"/> Invoked only when a <see cref="SceneEventType.SynchronizeComplete"/> event is being processed</term></item>
168
169
/// </list>
170
+
/// <em>Note: Do not start new scene events within NetworkSceneManager scene event notification callbacks.</em><br/>
169
171
/// </summary>
170
172
publiceventSceneEventDelegateOnSceneEvent;
171
173
@@ -239,13 +241,15 @@ public class NetworkSceneManager : IDisposable
239
241
240
242
/// <summary>
241
243
/// Invoked when a <see cref="SceneEventType.Load"/> event is started by the server.<br/>
242
-
/// <em>Note: The server and connected client(s) will always receive this notification.</em>
244
+
/// <em>Note: The server and connected client(s) will always receive this notification.</em><br/>
245
+
/// <em>*** Do not start new scene events within scene event notification callbacks.</em><br/>
243
246
/// </summary>
244
247
publiceventOnLoadDelegateHandlerOnLoad;
245
248
246
249
/// <summary>
247
250
/// Invoked when a <see cref="SceneEventType.Unload"/> event is started by the server.<br/>
248
-
/// <em>Note: The server and connected client(s) will always receive this notification.</em>
251
+
/// <em>Note: The server and connected client(s) will always receive this notification.</em><br/>
252
+
/// <em>*** Do not start new scene events within scene event notification callbacks.</em><br/>
249
253
/// </summary>
250
254
publiceventOnUnloadDelegateHandlerOnUnload;
251
255
@@ -254,7 +258,8 @@ public class NetworkSceneManager : IDisposable
254
258
/// after a client is approved for connection in order to synchronize the client with the currently loaded
255
259
/// scenes and NetworkObjects. This event signifies the beginning of the synchronization event.<br/>
256
260
/// <em>Note: The server and connected client(s) will always receive this notification.
257
-
/// This event is generated on a per newly connected and approved client basis.</em>
261
+
/// This event is generated on a per newly connected and approved client basis.</em><br/>
262
+
/// <em>*** Do not start new scene events within scene event notification callbacks.</em><br/>
0 commit comments