コード例 #1
0
        void DrawMarkerPalette()
        {
            EditorGUIUtility.labelWidth = 60f;
            EditorGUILayout.BeginHorizontal();
            var guiContent = new GUIContent("Palette", "Apply a custom Marker Palette to customize categories and colours.");

            EditorGUILayout.PrefixLabel(guiContent);
            customPalette = (MarkerPalette)EditorGUILayout.ObjectField(customPalette, typeof(MarkerPalette), allowSceneObjects: false);
            EditorGUILayout.EndHorizontal();
            Editor.CreateCachedEditor(Palette, null, ref paletteEditor);
            ((MarkerPaletteEditor)paletteEditor).canEdit = false;
            EditorGUIUtility.labelWidth = 0;
            paletteEditor.OnInspectorGUI();
        }
コード例 #2
0
        void Load()
        {
            var save = ChartEditorSave.Load();

            if (save != null)
            {
                chart                     = save.chart;
                customPalette             = save.palette;
                scale                     = save.scale;
                showGrids                 = save.showGrids;
                snapSetting               = save.snapSetting;
                panelChartFoldout         = save.panelChartFoldout;
                panelEditorOptionsFoldout = save.panelEditorOptionsFoldout;
                panelMarkerOptionsFoldout = save.panelMarkerOptionsFoldout;
            }
        }