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
thrownewInvalidOperationException($"[{GetType().Name}] Cannot reload the active scene because it is null or not loaded. Make sure to load a scene before trying to reload it.");
/// Reloads the active scene with an optional intermediate loading scene.
74
+
/// </summary>
75
+
/// <param name="intermediateSceneReference">
76
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
77
+
/// If null, the transition will not have an intermediate loading scene.
78
+
/// </param>
79
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
80
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
105
+
/// </summary>
106
+
/// <param name="intermediateSceneReference">
107
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
108
+
/// If null, the transition will not have an intermediate loading scene.
109
+
/// </param>
110
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
111
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
536
+
/// </summary>
537
+
/// <param name="loadingSceneName">
538
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
539
+
/// If null, the transition will not have an intermediate loading scene.
540
+
/// </param>
541
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
542
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
547
+
/// </summary>
548
+
/// <param name="loadingBuildIndex">
549
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
550
+
/// If null, the transition will not have an intermediate loading scene.
551
+
/// </param>
552
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
553
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
559
+
/// </summary>
560
+
/// <param name="loadingAssetReference">
561
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
562
+
/// If null, the transition will not have an intermediate loading scene.
563
+
/// </param>
564
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
565
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
570
+
/// </summary>
571
+
/// <param name="loadingAddress">
572
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
573
+
/// If null, the transition will not have an intermediate loading scene.
574
+
/// </param>
575
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
576
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
Copy file name to clipboardExpand all lines: Runtime/Utilities/SceneManagerExtensions.cs
+62Lines changed: 62 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -447,6 +447,68 @@ public static Task<SceneResult> TransitionAddressableAsync(this ISceneManager sc
447
447
}
448
448
#endif
449
449
450
+
/// <summary>
451
+
/// Reloads the active scene with an optional intermediate loading scene.
452
+
/// </summary>
453
+
/// <param name="loadingSceneName">
454
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
455
+
/// If null, the transition will not have an intermediate loading scene.
456
+
/// </param>
457
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
458
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
467
+
/// </summary>
468
+
/// <param name="loadingBuildIndex">
469
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
470
+
/// If null, the transition will not have an intermediate loading scene.
471
+
/// </param>
472
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
473
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
483
+
/// </summary>
484
+
/// <param name="loadingAssetReference">
485
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
486
+
/// If null, the transition will not have an intermediate loading scene.
487
+
/// </param>
488
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
489
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
/// Reloads the active scene with an optional intermediate loading scene.
498
+
/// </summary>
499
+
/// <param name="loadingAddress">
500
+
/// A reference to the scene that's going to be loaded as the transition intermediate (as a loading scene).
501
+
/// If null, the transition will not have an intermediate loading scene.
502
+
/// </param>
503
+
/// <param name="token">Optional token to manually cancel the operation. Note that Unity Scene Manager operations cannot be manually canceled and will continue to run.</param>
504
+
/// <returns>A <see cref="System.Threading.Tasks.Task{TResult}"/> with all scenes reloaded.</returns>
0 commit comments