Tanoda
ColorPickerPresetsEditor.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
UnityEditor
;
3
4
namespace
UnityEngine.UI.Extensions.ColorPicker
5
{
6
[CustomEditor(typeof(
ColorPickerPresets
))]
7
public
class
ColorPickerPresetsEditor
: Editor
8
{
9
public
override
void
OnInspectorGUI
()
10
{
11
base.OnInspectorGUI();
12
13
var colorPickerPresets = (
ColorPickerPresets
)target;
14
if
(colorPickerPresets.saveMode !=
ColorPickerPresets
.
SaveType
.JsonFile)
15
return
;
16
17
string
fileLocation = colorPickerPresets.JsonFilePath;
18
19
if
(!System.IO.File.Exists(fileLocation))
20
return
;
21
22
if
(GUILayout.Button(
"Open JSON file."
))
23
{
24
Application.OpenURL(fileLocation);
25
}
26
}
27
}
28
}
UnityEngine.UI.Extensions.ColorPicker.ColorPickerPresetsEditor
Definition:
ColorPickerPresetsEditor.cs:8
UnityEngine.UI.Extensions.ColorPicker.ColorPickerPresetsEditor.OnInspectorGUI
override void OnInspectorGUI()
Definition:
ColorPickerPresetsEditor.cs:9
UnityEngine.UI.Extensions.ColorPicker.ColorPickerPresets
Definition:
ColorPickerPresets.cs:8
UnityEngine.UI.Extensions.ColorPicker.ColorPickerPresets.SaveType
SaveType
Definition:
ColorPickerPresets.cs:24
UnityEditor
Definition:
BoxSliderEditor.cs:6
UnityEngine.UI.Extensions.ColorPicker
Definition:
ColorPickerPresetsEditor.cs:5
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
unity-ui-extensions
Editor
ColorPickerPresetsEditor.cs
Generated by
1.9.3