Skip to content

Commit dd9958c

Browse files
committed
Renamed IsSpawned to isSpawned
1 parent bfc97c2 commit dd9958c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

MLAPI-Editor/NetworkedObjectEditor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override void OnInspectorGUI()
2525
if (NetworkingManager.singleton == null || (!NetworkingManager.singleton.isServer && !NetworkingManager.singleton.isClient))
2626
base.OnInspectorGUI(); //Only run this if we are NOT running server. This is where the ServerOnly box is drawn
2727

28-
if (!networkedObject.IsSpawned && NetworkingManager.singleton != null && NetworkingManager.singleton.isServer)
28+
if (!networkedObject.isSpawned && NetworkingManager.singleton != null && NetworkingManager.singleton.isServer)
2929
{
3030
EditorGUILayout.BeginHorizontal();
3131
EditorGUILayout.LabelField(new GUIContent("Spawn", "Spawns the object across the network"));
@@ -36,11 +36,11 @@ public override void OnInspectorGUI()
3636
}
3737
EditorGUILayout.EndHorizontal();
3838
}
39-
else if(networkedObject.IsSpawned)
39+
else if(networkedObject.isSpawned)
4040
{
4141
EditorGUILayout.LabelField("NetworkId: ", networkedObject.NetworKId.ToString(), EditorStyles.label);
4242
EditorGUILayout.LabelField("OwnerId: ", networkedObject.OwnerClientId.ToString(), EditorStyles.label);
43-
EditorGUILayout.LabelField("isSpawned: ", networkedObject.IsSpawned.ToString(), EditorStyles.label);
43+
EditorGUILayout.LabelField("isSpawned: ", networkedObject.isSpawned.ToString(), EditorStyles.label);
4444
EditorGUILayout.LabelField("isLocalPlayer: ", networkedObject.isLocalPlayer.ToString(), EditorStyles.label);
4545
EditorGUILayout.LabelField("isOwner: ", networkedObject.isOwner.ToString(), EditorStyles.label);
4646
EditorGUILayout.LabelField("isPoolObject: ", networkedObject.isPlayerObject.ToString(), EditorStyles.label);

MLAPI/MonoBehaviours/Core/NetworkedObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ internal set
7878
/// <summary>
7979
/// Gets if the object has yet been spawned across the network
8080
/// </summary>
81-
public bool IsSpawned { get; internal set; }
81+
public bool isSpawned { get; internal set; }
8282
internal bool? sceneObject = null;
8383

8484
/// <summary>

MLAPI/NetworkingManagerComponents/Core/NetworkSceneManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private static void OnSceneUnload(AsyncOperation operation)
116116
NetworkedObject[] networkedObjects = MonoBehaviour.FindObjectsOfType<NetworkedObject>();
117117
for (int i = 0; i < networkedObjects.Length; i++)
118118
{
119-
if (!networkedObjects[i].IsSpawned && (networkedObjects[i].sceneObject == null || networkedObjects[i].sceneObject == true))
119+
if (!networkedObjects[i].isSpawned && (networkedObjects[i].sceneObject == null || networkedObjects[i].sceneObject == true))
120120
networkedObjects[i].Spawn();
121121
}
122122

MLAPI/NetworkingManagerComponents/Core/SpawnManager.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ internal static NetworkedObject CreateSpawnedObject(int networkedPrefabId, uint
172172
if (readSyncedVar) netObject.SetFormattedSyncedVarData(reader);
173173

174174
netObject.NetworkedPrefabName = netManager.NetworkConfig.NetworkPrefabNames[networkedPrefabId];
175-
netObject.IsSpawned = true;
175+
netObject.isSpawned = true;
176176
netObject.isPooledObject = false;
177177

178178
if (netManager.isServer) netObject.NetworKId = GetNetworkObjectId();
@@ -191,7 +191,7 @@ internal static NetworkedObject CreateSpawnedObject(int networkedPrefabId, uint
191191

192192
internal static void UnSpawnObject(NetworkedObject netObject)
193193
{
194-
if (!netObject.IsSpawned)
194+
if (!netObject.isSpawned)
195195
{
196196
if (LogHelper.CurrentLogLevel <= LogLevel.Normal) LogHelper.LogWarning("Cannot unspawn objects that are not spawned");
197197
return;
@@ -213,7 +213,7 @@ internal static void UnSpawnObject(NetworkedObject netObject)
213213
//Server only
214214
internal static void SpawnPlayerObject(NetworkedObject netObject, uint clientId, BitWriter payload = null)
215215
{
216-
if (netObject.IsSpawned)
216+
if (netObject.isSpawned)
217217
{
218218
if (LogHelper.CurrentLogLevel <= LogLevel.Normal) LogHelper.LogWarning("Object already spawned");
219219
return;
@@ -241,7 +241,7 @@ internal static void SpawnPlayerObject(NetworkedObject netObject, uint clientId,
241241
uint netId = GetNetworkObjectId();
242242
netObject.NetworKId = netId;
243243
spawnedObjects.Add(netId, netObject);
244-
netObject.IsSpawned = true;
244+
netObject.isSpawned = true;
245245
netObject.sceneObject = false;
246246
netObject.isPlayerObject = true;
247247
netManager.ConnectedClients[clientId].PlayerObject = netObject;
@@ -283,7 +283,7 @@ internal static void SpawnPlayerObject(NetworkedObject netObject, uint clientId,
283283

284284
internal static void SpawnObject(NetworkedObject netObject, uint? clientOwnerId = null, BitWriter payload = null)
285285
{
286-
if (netObject.IsSpawned)
286+
if (netObject.isSpawned)
287287
{
288288
if (LogHelper.CurrentLogLevel <= LogLevel.Normal) LogHelper.LogWarning("Object already spawned");
289289
return;
@@ -306,7 +306,7 @@ internal static void SpawnObject(NetworkedObject netObject, uint? clientOwnerId
306306
uint netId = GetNetworkObjectId();
307307
netObject.NetworKId = netId;
308308
spawnedObjects.Add(netId, netObject);
309-
netObject.IsSpawned = true;
309+
netObject.isSpawned = true;
310310
netObject.sceneObject = false;
311311

312312
if (clientOwnerId != null)
@@ -360,7 +360,7 @@ internal static void OnDestroyObject(uint networkId, bool destroyGameObject)
360360
//Someone owns it.
361361
netManager.ConnectedClients[spawnedObjects[networkId].OwnerClientId].OwnedObjects.RemoveAll(x => x.NetworKId == networkId);
362362
}
363-
spawnedObjects[networkId].IsSpawned = false;
363+
spawnedObjects[networkId].isSpawned = false;
364364

365365
if (netManager != null && netManager.isServer)
366366
{

0 commit comments

Comments
 (0)