mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkScenePostProcess: rename 'uv' to 'identity'
This commit is contained in:
parent
e19af230b9
commit
9b49b34f3c
@ -136,23 +136,23 @@ public static void OnPostProcessScene()
|
|||||||
uvs.Sort(CompareNetworkIdentitySiblingPaths);
|
uvs.Sort(CompareNetworkIdentitySiblingPaths);
|
||||||
|
|
||||||
uint nextSceneId = 1;
|
uint nextSceneId = 1;
|
||||||
foreach (NetworkIdentity uv in uvs)
|
foreach (NetworkIdentity identity in uvs)
|
||||||
{
|
{
|
||||||
// if we had a [ConflictComponent] attribute that would be better than this check.
|
// if we had a [ConflictComponent] attribute that would be better than this check.
|
||||||
// also there is no context about which scene this is in.
|
// also there is no context about which scene this is in.
|
||||||
if (uv.GetComponent<NetworkManager>() != null)
|
if (identity.GetComponent<NetworkManager>() != null)
|
||||||
{
|
{
|
||||||
Debug.LogError("NetworkManager has a NetworkIdentity component. This will cause the NetworkManager object to be disabled, so it is not recommended.");
|
Debug.LogError("NetworkManager has a NetworkIdentity component. This will cause the NetworkManager object to be disabled, so it is not recommended.");
|
||||||
}
|
}
|
||||||
if (uv.isClient || uv.isServer)
|
if (identity.isClient || identity.isServer)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
uv.gameObject.SetActive(false);
|
identity.gameObject.SetActive(false);
|
||||||
uv.ForceSceneId(nextSceneId++);
|
identity.ForceSceneId(nextSceneId++);
|
||||||
if (LogFilter.Debug) { Debug.Log("PostProcess sceneid assigned: name=" + uv.name + " scene=" + uv.gameObject.scene.name + " sceneid=" + uv.sceneId); }
|
if (LogFilter.Debug) { Debug.Log("PostProcess sceneid assigned: name=" + identity.name + " scene=" + identity.gameObject.scene.name + " sceneid=" + identity.sceneId); }
|
||||||
|
|
||||||
// saftey check for prefabs with more than one NetworkIdentity
|
// saftey check for prefabs with more than one NetworkIdentity
|
||||||
GameObject prefabGO = PrefabUtility.GetPrefabParent(uv.gameObject) as GameObject;
|
GameObject prefabGO = PrefabUtility.GetPrefabParent(identity.gameObject) as GameObject;
|
||||||
if (prefabGO)
|
if (prefabGO)
|
||||||
{
|
{
|
||||||
GameObject prefabRootGO = PrefabUtility.FindPrefabRoot(prefabGO);
|
GameObject prefabRootGO = PrefabUtility.FindPrefabRoot(prefabGO);
|
||||||
|
Loading…
Reference in New Issue
Block a user