1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . ComponentModel ;
3
4
using UnityEngine ;
5
+ using AsyncOperation = UnityEngine . AsyncOperation ;
4
6
5
7
namespace MLAPI . SceneManagement
6
8
{
@@ -28,11 +30,23 @@ public class SceneSwitchProgress
28
30
/// <summary>
29
31
/// Is this scene switch progresses completed, all clients are done loading the scene or a timeout has occured.
30
32
/// </summary>
31
- public bool isCompleted { get ; private set ; }
33
+ public bool IsCompleted { get ; private set ; }
34
+ /// <summary>
35
+ /// Is this scene switch progresses completed, all clients are done loading the scene or a timeout has occured.
36
+ /// </summary>
37
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
38
+ [ Obsolete ( "Use IsCompleted instead" , false ) ]
39
+ public bool isCompleted => IsCompleted ;
40
+ /// <summary>
41
+ /// If all clients are done loading the scene, at the moment of completed.
42
+ /// </summary>
43
+ public bool IsAllClientsDoneLoading { get ; private set ; }
32
44
/// <summary>
33
45
/// If all clients are done loading the scene, at the moment of completed.
34
46
/// </summary>
35
- public bool isAllClientsDoneLoading { get ; private set ; }
47
+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
48
+ [ Obsolete ( "Use IsCompleted instead" , false ) ]
49
+ public bool isAllClientsDoneLoading => IsAllClientsDoneLoading ;
36
50
/// <summary>
37
51
/// Delegate type for when a client is done loading the scene.
38
52
/// </summary>
@@ -74,10 +88,10 @@ internal void SetSceneLoadOperation(AsyncOperation sceneLoadOperation)
74
88
75
89
internal void CheckCompletion ( )
76
90
{
77
- if ( ! isCompleted && DoneClients . Count == NetworkingManager . Singleton . ConnectedClientsList . Count && sceneLoadOperation . isDone )
91
+ if ( ! IsCompleted && DoneClients . Count == NetworkingManager . Singleton . ConnectedClientsList . Count && sceneLoadOperation . isDone )
78
92
{
79
- isCompleted = true ;
80
- isAllClientsDoneLoading = true ;
93
+ IsCompleted = true ;
94
+ IsAllClientsDoneLoading = true ;
81
95
NetworkSceneManager . sceneSwitchProgresses . Remove ( guid ) ;
82
96
if ( OnComplete != null )
83
97
OnComplete . Invoke ( false ) ;
@@ -88,9 +102,9 @@ internal void CheckCompletion()
88
102
89
103
internal void SetTimedOut ( )
90
104
{
91
- if ( ! isCompleted )
105
+ if ( ! IsCompleted )
92
106
{
93
- isCompleted = true ;
107
+ IsCompleted = true ;
94
108
NetworkSceneManager . sceneSwitchProgresses . Remove ( guid ) ;
95
109
if ( OnComplete != null )
96
110
OnComplete . Invoke ( true ) ;
0 commit comments