mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
syntax
This commit is contained in:
parent
d8187d4b7d
commit
4624f34b0e
@ -89,14 +89,14 @@ static void PrepareSceneObject(NetworkIdentity identity)
|
|||||||
#if UNITY_2018_2_OR_NEWER
|
#if UNITY_2018_2_OR_NEWER
|
||||||
GameObject prefabGO = PrefabUtility.GetCorrespondingObjectFromSource(identity.gameObject);
|
GameObject prefabGO = PrefabUtility.GetCorrespondingObjectFromSource(identity.gameObject);
|
||||||
#else
|
#else
|
||||||
GameObject prefabGO = PrefabUtility.GetPrefabParent(identity.gameObject);
|
GameObject prefabGO = PrefabUtility.GetPrefabParent(identity.gameObject);
|
||||||
#endif
|
#endif
|
||||||
if (prefabGO)
|
if (prefabGO)
|
||||||
{
|
{
|
||||||
#if UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3_OR_NEWER
|
||||||
GameObject prefabRootGO = prefabGO.transform.root.gameObject;
|
GameObject prefabRootGO = prefabGO.transform.root.gameObject;
|
||||||
#else
|
#else
|
||||||
GameObject prefabRootGO = PrefabUtility.FindPrefabRoot(prefabGO);
|
GameObject prefabRootGO = PrefabUtility.FindPrefabRoot(prefabGO);
|
||||||
#endif
|
#endif
|
||||||
if (prefabRootGO != null && prefabRootGO.GetComponentsInChildren<NetworkIdentity>().Length > 1)
|
if (prefabRootGO != null && prefabRootGO.GetComponentsInChildren<NetworkIdentity>().Length > 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user