Skip to content

Commit 157ee9f

Browse files
committed
fix: wrong conditions
1 parent be0a166 commit 157ee9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Scripts/GameApi/LiteNetLibIdentity.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ internal void SetupIDs()
291291
}
292292
else if (ThisIsASceneObjectWithThatReferencesPrefabAsset(out prefab))
293293
{
294-
if (!Application.isPlaying)
294+
if (Application.isPlaying)
295295
{
296296
Debug.LogWarning($"[LiteNetLibIdentity] Cannot setup IDs while playing", gameObject);
297297
return;
@@ -303,7 +303,7 @@ internal void SetupIDs()
303303
}
304304
else
305305
{
306-
if (!Application.isPlaying)
306+
if (Application.isPlaying)
307307
{
308308
Debug.LogWarning($"[LiteNetLibIdentity] Cannot setup IDs while playing", gameObject);
309309
return;
@@ -312,7 +312,7 @@ internal void SetupIDs()
312312
assetId = string.Empty;
313313
}
314314
// Do not mark dirty while playing
315-
if (!Application.isPlaying && oldAssetId != assetId)
315+
if (!Application.isPlaying && !string.Equals(oldAssetId, assetId))
316316
EditorUtility.SetDirty(this);
317317
}
318318
#endif

0 commit comments

Comments
 (0)