Skip to content

Commit

Permalink
feat!: SpawnVisibleObjects no longer skips disabled gameObject
Browse files Browse the repository at this point in the history
BREAKING CHANGE: SpawnVisibleObjects no longer checks `identity.gameObject.activeSelf` before spawning objects
  • Loading branch information
James-Frowen committed Dec 27, 2024
1 parent 91f89ea commit d160e77
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Assets/Mirage/Runtime/ServerObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -768,16 +768,12 @@ public void SpawnVisibleObjects(INetworkPlayer player, bool ignoreHasCharacter,
if (skip != null && skip.Contains(identity))
continue;

// todo, do we only need to spawn active objects here? or all objects?
if (identity.gameObject.activeSelf)
{
if (logger.LogEnabled()) logger.Log($"Checking Observers on server objects name='{identity.name}' netId={identity.NetId} sceneId={identity.SceneId:X}");

var visible = identity.OnCheckObserver(player);
if (visible)
{
identity.AddObserver(player);
}
}
}

Expand Down

0 comments on commit d160e77

Please sign in to comment.