void IShowableRecord.Show()
 {
     if (!CSSelectionTools.RevealAndSelectFileAsset(assetDatabasePath))
     {
         MaintainerWindow.ShowNotification("Can't show it properly");
     }
 }
Esempio n. 2
0
 public void Show()
 {
     if (!CSSelectionTools.RevealAndSelectFileAsset(Path))
     {
         MaintainerWindow.ShowNotification("Can't show it properly");
     }
 }
Esempio n. 3
0
        private static void ShowItem(ReferencesTreeViewItem <T> item)
        {
            var assetPath = item.data.assetPath;

            if (item.data.assetSettingsKind == AssetSettingsKind.NotSettings)
            {
                if (!CSSelectionTools.RevealAndSelectFileAsset(assetPath))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }
            }
            else
            {
                if (!CSEditorTools.RevealInSettings(item.data.assetSettingsKind, assetPath))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }
            }
        }
Esempio n. 4
0
        protected override void ShowItem(TreeViewItem clickedItem)
        {
            var item      = (ProjectReferencesTreeViewItem <T>)clickedItem;
            var assetPath = item.data.assetPath;

            if (item.data.assetSettingsKind == AssetSettingsKind.NotSettings)
            {
                if (!CSSelectionTools.RevealAndSelectFileAsset(assetPath))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }
            }
            else
            {
                if (!CSEditorTools.RevealInSettings(item.data.assetSettingsKind, assetPath))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }
            }
        }
Esempio n. 5
0
        private static void ShowItem(ExactReferencesListItem <T> item)
        {
            var assetPath        = item.data.assetPath;
            var referencingEntry = item.data.entry;

            if (referencingEntry.location == Location.SceneLightingSettings ||
                referencingEntry.location == Location.SceneNavigationSettings)
            {
                var sceneOpenResult = CSSceneTools.OpenSceneWithSavePrompt(assetPath);
                if (!sceneOpenResult.success)
                {
                    Debug.LogError(Maintainer.ConstructError("Can't open scene " + assetPath));
                    MaintainerWindow.ShowNotification("Can't show it properly");
                    return;
                }
            }

            switch (referencingEntry.location)
            {
            case Location.ScriptAsset:
            case Location.ScriptableObjectAsset:

                if (!CSSelectionTools.RevealAndSelectFileAsset(assetPath))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                break;

            case Location.PrefabAssetObject:
                if (!CSSelectionTools.RevealAndSelectSubAsset(assetPath, referencingEntry.transformPath,
                                                              referencingEntry.objectId))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                break;

            case Location.PrefabAssetGameObject:
            case Location.SceneGameObject:

                if (!CSSelectionTools.RevealAndSelectGameObject(assetPath, referencingEntry.transformPath,
                                                                referencingEntry.objectId, referencingEntry.componentId))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                break;

            case Location.SceneLightingSettings:

                if (!CSMenuTools.ShowSceneSettingsLighting())
                {
                    Debug.LogError(Maintainer.ConstructError("Can't open Lighting settings!"));
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                break;

            case Location.SceneNavigationSettings:

                if (!CSMenuTools.ShowSceneSettingsNavigation())
                {
                    Debug.LogError(Maintainer.ConstructError("Can't open Navigation settings!"));
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                break;

            case Location.NotFound:
            case Location.Invisible:
                break;

            case Location.TileMap:

                if (!CSSelectionTools.RevealAndSelectGameObject(assetPath, referencingEntry.transformPath,
                                                                referencingEntry.objectId, referencingEntry.componentId))
                {
                    MaintainerWindow.ShowNotification("Can't show it properly");
                }

                // TODO: open tile map editor window?

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }