Ejemplo n.º 1
0
        private void OnEnable()
        {
            assetDependencyConfig = AssetDependencyUtil.GetAssetDependencyConfig();

            Selection.selectionChanged += OnSelectionChanged;
            EditorApplication.update   += Repaint;
        }
Ejemplo n.º 2
0
        private void DrawToolbar()
        {
            EditorGUILayout.BeginHorizontal("toolbar", GUILayout.ExpandWidth(true));
            {
                if (GUILayout.Button("Reload", EditorStyles.toolbarButton, GUILayout.Width(80)))
                {
                    if (EditorUtility.DisplayDialog("Warning", "This will take a lot of time.Are you sure?", "OK", "Cancel"))
                    {
                        assetDependencyConfig = AssetDependencyUtil.FindAllAssetData();
                        RefreshTreeView();
                    }
                }
                GUILayout.FlexibleSpace();

                var newAutoRefresh = EditorGUILayout.ToggleLeft("Auto Refresh", isAutoRefresh);
                if (newAutoRefresh != isAutoRefresh)
                {
                    isAutoRefresh = newAutoRefresh;
                    RefreshTreeView();
                }
            }
            EditorGUILayout.EndHorizontal();
        }