コード例 #1
0
        void UpdateStatusChecks(GameObject prefabInstanceRoot)
        {
            // Can't reset values inside this method, since it's called consecutively for each target.

            if (PrefabUtility.HasPrefabInstanceAnyOverrides(prefabInstanceRoot, false))
            {
                m_AnyOverrides = true;
            }
            if (PrefabUtility.IsDisconnectedFromPrefabAsset(prefabInstanceRoot))
            {
                m_Disconnected = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabInstanceRoot))
            {
                m_InvalidComponentOnInstance = true;
            }

            GameObject prefabAssetRoot = PrefabUtility.GetCorrespondingObjectFromSource(prefabInstanceRoot);

            if (PrefabUtility.IsPartOfModelPrefab(prefabAssetRoot))
            {
                m_ModelPrefab = true;
            }
            if (PrefabUtility.IsPartOfImmutablePrefab(prefabAssetRoot))
            {
                m_Immutable = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabAssetRoot))
            {
                m_InvalidComponentOnAsset = true;
            }
        }
コード例 #2
0
        void UpdateStatusChecks(GameObject prefabInstanceRoot)
        {
            if (PrefabUtility.HasPrefabInstanceAnyOverrides(prefabInstanceRoot, false))
            {
                m_AnyOverrides = true;
            }
            if (PrefabUtility.IsDisconnectedFromPrefabAsset(prefabInstanceRoot))
            {
                m_Disconnected = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabInstanceRoot))
            {
                m_InvalidComponentOnInstance = true;
            }

            GameObject prefabAssetRoot = PrefabUtility.GetCorrespondingObjectFromSource(prefabInstanceRoot);

            if (PrefabUtility.IsPartOfModelPrefab(prefabAssetRoot))
            {
                m_ModelPrefab = true;
            }
            if (PrefabUtility.IsPartOfImmutablePrefab(prefabAssetRoot))
            {
                m_Immutable = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabAssetRoot))
            {
                m_InvalidComponentOnAsset = true;
            }
        }
コード例 #3
0
        void UpdateStatusChecks(GameObject prefabInstanceRoot)
        {
            // Can't reset values inside this method, since it's called consecutively for each target.

            if (PrefabUtility.HasPrefabInstanceAnyOverrides(prefabInstanceRoot, false))
            {
                m_AnyOverrides = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabInstanceRoot))
            {
                m_InvalidComponentOnInstance = true;
            }

            GameObject prefabAssetRoot = PrefabUtility.GetCorrespondingObjectFromSource(prefabInstanceRoot);

            if (PrefabUtility.IsPartOfModelPrefab(prefabAssetRoot))
            {
                m_ModelPrefab = true;
            }
            if (PrefabUtility.IsPartOfImmutablePrefab(prefabAssetRoot))
            {
                m_Immutable = true;
            }
            if (PrefabUtility.HasInvalidComponent(prefabAssetRoot))
            {
                m_InvalidComponentOnAsset = true;
            }

            if (PrefabUtility.HasManagedReferencesWithMissingTypes(prefabAssetRoot))
            {
                m_HasManagedReferencesWithMissingTypesOnAsset = true;
            }

            m_HasApplicableOverrides = m_TreeView == null || m_TreeView.hasApplicableModifications;
        }