Пример #1
0
        internal static bool IsAnyMonoBehaviourTargetPartOfPrefabInstance(Editor editor)
        {
            if ((editor.target is MonoBehaviour) == false)
            {
                return(false);
            }

            foreach (var t in editor.targets)
            {
                var instanceID = t.GetInstanceID();
                if (PrefabUtility.IsInstanceIDPartOfNonAssetPrefabInstance(instanceID))
                {
                    return(true);
                }
            }

            return(false);
        }