Skip to content

Commit 9183da1

Browse files
committed
refactor: Pascal cased NetworkSceneProgress
1 parent e32c658 commit 9183da1

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

MLAPI/SceneManagement/SceneSwitchProgress.cs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using UnityEngine;
5+
using AsyncOperation = UnityEngine.AsyncOperation;
46

57
namespace MLAPI.SceneManagement
68
{
@@ -28,11 +30,23 @@ public class SceneSwitchProgress
2830
/// <summary>
2931
/// Is this scene switch progresses completed, all clients are done loading the scene or a timeout has occured.
3032
/// </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; }
3244
/// <summary>
3345
/// If all clients are done loading the scene, at the moment of completed.
3446
/// </summary>
35-
public bool isAllClientsDoneLoading { get; private set; }
47+
[EditorBrowsable(EditorBrowsableState.Never)]
48+
[Obsolete("Use IsCompleted instead", false)]
49+
public bool isAllClientsDoneLoading => IsAllClientsDoneLoading;
3650
/// <summary>
3751
/// Delegate type for when a client is done loading the scene.
3852
/// </summary>
@@ -74,10 +88,10 @@ internal void SetSceneLoadOperation(AsyncOperation sceneLoadOperation)
7488

7589
internal void CheckCompletion()
7690
{
77-
if (!isCompleted && DoneClients.Count == NetworkingManager.Singleton.ConnectedClientsList.Count && sceneLoadOperation.isDone)
91+
if (!IsCompleted && DoneClients.Count == NetworkingManager.Singleton.ConnectedClientsList.Count && sceneLoadOperation.isDone)
7892
{
79-
isCompleted = true;
80-
isAllClientsDoneLoading = true;
93+
IsCompleted = true;
94+
IsAllClientsDoneLoading = true;
8195
NetworkSceneManager.sceneSwitchProgresses.Remove(guid);
8296
if (OnComplete != null)
8397
OnComplete.Invoke(false);
@@ -88,9 +102,9 @@ internal void CheckCompletion()
88102

89103
internal void SetTimedOut()
90104
{
91-
if (!isCompleted)
105+
if (!IsCompleted)
92106
{
93-
isCompleted = true;
107+
IsCompleted = true;
94108
NetworkSceneManager.sceneSwitchProgresses.Remove(guid);
95109
if (OnComplete != null)
96110
OnComplete.Invoke(true);

0 commit comments

Comments
 (0)