mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
more sorting
This commit is contained in:
parent
632a4a8cc2
commit
0fe5d30c00
@ -868,6 +868,16 @@ static void SpawnObject(GameObject obj, NetworkConnection ownerConnection)
|
||||
RebuildObservers(identity, true);
|
||||
}
|
||||
|
||||
static bool VerifyCanSpawn(GameObject obj)
|
||||
{
|
||||
if (Utils.IsPrefab(obj))
|
||||
{
|
||||
Debug.LogError($"GameObject {obj.name} is a prefab, it can't be spawned. This will cause errors in builds.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Spawn the given game object on all clients which are ready.</summary>
|
||||
// This will cause a new object to be instantiated from the registered
|
||||
// prefab, or from a custom spawn function.
|
||||
@ -913,16 +923,6 @@ public static void Spawn(GameObject obj, Guid assetId, NetworkConnection ownerCo
|
||||
}
|
||||
}
|
||||
|
||||
static bool VerifyCanSpawn(GameObject obj)
|
||||
{
|
||||
if (Utils.IsPrefab(obj))
|
||||
{
|
||||
Debug.LogError($"GameObject {obj.name} is a prefab, it can't be spawned. This will cause errors in builds.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static bool ValidateSceneObject(NetworkIdentity identity)
|
||||
{
|
||||
if (identity.gameObject.hideFlags == HideFlags.NotEditable ||
|
||||
|
Loading…
Reference in New Issue
Block a user