Exemplo n.º 1
0
        public static bool IsPrefabDisconnected(this GameObject self)
        {
#if UNITY_EDITOR
            return(self != null && PrefabUtility.GetPrefabType(self) == PrefabType.DisconnectedPrefabInstance);
#else
            return(IsPrefab(self));            // fallback
#endif
        }
Exemplo n.º 2
0
        public static bool IsPrefabOriginal(this GameObject self)
        {
#if UNITY_EDITOR
            return(self != null && PrefabUtility.GetPrefabType(self) == PrefabType.Prefab);
#else
            return(IsPrefab(self));            // fallback
#endif
        }