示例#1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
    private void OnGUI()
    {
        var style = new GUIStyle(GUI.skin.label)
        {
            alignment = TextAnchor.MiddleCenter
        };

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("<<< MAKE BUILD FIRST! >>>", style);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Space();

        EditorGUILayout.BeginHorizontal();
        if (string.IsNullOrEmpty(_editorLog))
        {
            source = EditorGUILayout.ObjectField(source, typeof(TextAsset), true);
        }
        else
        {
            EditorGUILayout.LabelField(_editorLogPath);
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Search:", GUILayout.Width(60f));
        _searchFilter = EditorGUILayout.TextField(_searchFilter);

        GUI.backgroundColor = Color.red;
        if (GUILayout.Button("Move >>", GUILayout.Width(60f)))
        {
            MoveDependencies.Init();
            MoveDependencies.UpdateAssets(GetListAssets());
        }
        GUI.backgroundColor = Color.white;

        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Search!"))
        {
            if (string.IsNullOrEmpty(_editorLog) && source == null)
            {
                ShowNotification(new GUIContent("No Log file selected for searching"));
            }

            else if (!string.IsNullOrEmpty(_editorLog) || source.GetType() == typeof(TextAsset))
            {
                ResetPages();
                SearchDependencies();
            }
        }

        EditorGUILayout.Space();
        ListDependencies();
    }
示例#3
0
    public static void Init()
    {
        MoveDependencies window = (MoveDependencies)GetWindow(typeof(MoveDependencies));

        window.Show();
    }