mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
More #if fixes (again)
This commit is contained in:
parent
632cb1b483
commit
e969fcf26c
@ -247,6 +247,11 @@ bool ThisIsASceneObjectWithPrefabParent(out GameObject prefab)
|
||||
return false;
|
||||
}
|
||||
prefab = (GameObject)PrefabUtility.GetCorrespondingObjectFromSource(gameObject);
|
||||
#elif UNITY_2018_2_OR_NEWER
|
||||
PrefabType prefabType = PrefabUtility.GetPrefabType(gameObject);
|
||||
if (prefabType == PrefabType.None)
|
||||
return false;
|
||||
prefab = (GameObject)PrefabUtility.GetCorrespondingObjectFromSource(gameObject);
|
||||
#else
|
||||
PrefabType prefabType = PrefabUtility.GetPrefabType(gameObject);
|
||||
if (prefabType == PrefabType.None)
|
||||
|
@ -931,6 +931,8 @@ static bool CheckForPrefab(GameObject obj)
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
return UnityEditor.PrefabUtility.IsPartOfPrefabAsset(obj);
|
||||
#elif UNITY_2018_2_OR_NEWER
|
||||
return (UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(obj) == null) && (UnityEditor.PrefabUtility.GetPrefabObject(obj) != null);
|
||||
#else
|
||||
return (UnityEditor.PrefabUtility.GetPrefabParent(obj) == null) && (UnityEditor.PrefabUtility.GetPrefabObject(obj) != null);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user