コード例 #1
0
 private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
 {
     if (!GridPaintingState.savingPalette)
     {
         GridPalettes.CleanCache();
     }
 }
コード例 #2
0
 private void DoClipboardHeader()
 {
     if (!GridPalettes.palettes.Contains(this.palette) || this.palette == null)
     {
         GridPalettes.CleanCache();
         if (GridPalettes.palettes.Count > 0)
         {
             this.palette = GridPalettes.palettes.LastOrDefault <GameObject>();
         }
     }
     EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
     this.DoPalettesDropdown();
     using (new EditorGUI.DisabledScope(this.palette == null))
     {
         this.clipboardView.unlocked = GUILayout.Toggle(this.clipboardView.unlocked, (!this.clipboardView.isModified) ? GridPaintPaletteWindow.Styles.edit : GridPaintPaletteWindow.Styles.editModified, EditorStyles.toolbarButton, new GUILayoutOption[0]);
     }
     GUILayout.FlexibleSpace();
     EditorGUILayout.EndHorizontal();
 }
コード例 #3
0
        private void DoClipboardHeader()
        {
            if (!GridPalettes.palettes.Contains(palette) || palette == null) // Palette not in list means it was deleted
            {
                GridPalettes.CleanCache();
                if (GridPalettes.palettes.Count > 0)
                {
                    palette = GridPalettes.palettes.LastOrDefault();
                }
            }

            EditorGUILayout.BeginHorizontal();
            DoPalettesDropdown();
            using (new EditorGUI.DisabledScope(palette == null))
            {
                clipboardView.unlocked = GUILayout.Toggle(clipboardView.unlocked,
                                                          clipboardView.isModified ? Styles.editModified : Styles.edit,
                                                          EditorStyles.toolbarButton);
            }
            GUILayout.FlexibleSpace();
            EditorGUILayout.EndHorizontal();
        }