Пример #1
0
        public void DrawLeftColumnHeader()
        {
            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Space(10);
                using (new GUILayout.VerticalScope())
                {
                    GUILayout.Space(10);
                    GUILayout.Label("<size=16><b>Search references of:</b></size>", UIHelpers.richLabel);
                    UIHelpers.Separator();
                    GUILayout.Space(10);

                    if (UIHelpers.ImageButton("All assets",
                                              "Traverses whole project to find where all assets are referenced.", CSIcons.Find))
                    {
                        if (Event.current.control && Event.current.shift)
                        {
                            ReferencesFinder.debugMode = true;
                            AssetsMap.Delete();
                            Event.current.Use();
                        }
                        else
                        {
                            ReferencesFinder.debugMode = false;
                        }

                        EditorApplication.delayCall += StartProjectReferencesScan;
                    }

                    if (ProjectScopeReferencesFinder.GetSelectedAssets().Length == 0)
                    {
                        GUI.enabled = false;
                    }

                    if (UIHelpers.ImageButton("Selected assets",
                                              "Adds selected Project View assets to the current search results.", CSIcons.Find))
                    {
                        EditorApplication.delayCall += () => ReferencesFinder.FindSelectedAssetsReferences();
                    }
                }
                GUILayout.Space(10);
            }

            GUI.enabled = true;
        }
Пример #2
0
 public static bool ValidateFindReferences()
 {
     return(ProjectScopeReferencesFinder.GetSelectedAssets().Length > 0);
 }