RichLabel
/NoLabel
AboveRichLabel
/ BelowRichLabel
OverlayRichLabel
PostFieldRichLabel
PlayaRichLabel
InfoBox
/BelowInfoBox
PlayaInfoBox
/PlayaBelowInfoBox
Separator
/ BelowSeparator
PlayaSeparator
SepTitle
GUIColor
AboveButton
/BelowButton
/PostFieldButton
Button
Layer
Scene
SortingLayer
Tag
InputAxis
ShaderParam
ShaderKeyword
GameObjectActive
SpriteToggle
MaterialToggle
ColorToggle
Expandable
ReferencePicker
SaintsRow
ListDrawerSettings
Table
ShowInInspector
Rate
PropRange
MinMaxSlider
ProgressBar
AnimatorParam
AnimatorState
CurveRange
GetComponent
GetComponentInChildren
GetComponentInParent
/ GetComponentInParents
GetComponentInScene
GetPrefabWithComponent
GetScriptableObject
GetByXPath
AddComponent
FindComponent
GetComponentByPath
FieldType
OnValueChanged
OnArraySizeChanged
ReadOnly
/DisableIf
/EnableIf
PlayaEnableIf
/PlayaDisableIf
ShowIf
/ HideIf
PlayaShowIf
/PlayaHideIf
Required
ValidateInput
MinValue
/ MaxValue
RequireType
ArraySize
PlayaArraySize
Ordered
Layout
LayoutStart
/ LayoutEnd
LayoutCloseHere
/ LayoutTerminateHere
LayoutDisableIf
/ LayoutEnableIf
LayoutShowIf
/ LayoutHideIf
DrawLabel
PositionHandle
DrawLine
SaintsArrow
ArrowHandleCap
DrawWireDisc
SphereHandleCap
Dropdown
AdvancedDropdown
EnumToggleButtons
FlagsDropdown
ResizableTextArea
LeftToggle
ResourcePath
ResourceFolder
DefaultExpand
ArrayDefaultExpand
AssetFolder
AssetPreview
AboveImage
/BelowImage
ParticlePlay
ButtonAddOnClick
OnButtonClick
OnEvent
ColorPalette
SaintsArray
/SaintsList
SaintsDictionary<,>
SaintsInterface<,>
/SaintsObjInterface<>
AddressableLabel
AddressableAddress
AddressableResource
AddressableScene
NavMeshAreaMask
NavMeshArea
SpineAnimationPicker
SpineSkinPicker
SpineSlotPicker
SpineAttachmentPicker
DOTweenPlay
DOTweenPlayStart
/ DOTweenPlayEnd
LocalizedStringPicker
SaintsEditorWindow
WindowInlineEditor
EXP
Basic usage: inherent from SaintsField.Editor.SaintsEditorWindow
#if UNITY_EDITOR using SaintsField.Editor; public class ExamplePanel: SaintsEditorWindow { [MenuItem("Window/Saints/Example/SaintsEditor")] public static void OpenWindow() { EditorWindow window = GetWindow<ExamplePanel>(false, "My Panel"); window.Show(); } // fields [ResizableTextArea] public string myString; [ProgressBar(100f)] public float myProgress; // life-circle: OnUpdate function public override void OnEditorUpdate() { myProgress = (myProgress + 1f) % 100; } [ProgressBar(100f)] public float myCoroutine; // Layout supported [LayoutStart("Coroutine", ELayout.Horizontal)] private IEnumerator _startProcessing; // Button etc supported // EditorCoroutine supported [Button] public void StartIt() { StartEditorCoroutine(_startProcessing = StartProcessing()); } [Button] public void StopIt() { if (_startProcessing != null) { StopEditorCoroutine(_startProcessing); } _startProcessing = null; } private IEnumerator StartProcessing() { myCoroutine = 0; while (myCoroutine < 100f) { myCoroutine += 1f; yield return null; } } // Other life-circle public override void OnEditorEnable() { Debug.Log("Enable"); } public override void OnEditorDisable() { Debug.Log("Disable"); } public override void OnEditorDestroy() { Debug.Log("Destroy"); } } #endif
An example of using as a ScriptableObject
editor (or any serializable object)
#if UNITY_EDITOR using SaintsField.Editor; using SaintsField.Playa; public class ExampleSo: SaintsEditorWindow { [MenuItem("Window/Saints/Example/ScriptableEditor")] public static void OpenWindow() { EditorWindow window = GetWindow<ExampleSo>(false, "Scriptable Editor"); window.Show(); } [ AdvancedDropdown(nameof(ShowDropdown)), OnValueChanged(nameof(TargetChanged)) ] public ScriptableObject inspectTarget; [WindowInlineEditor] // this will inline the serialized object editor public Object editorInlineInspect; private IReadOnlyList<ScriptableObject> GetAllSo() => Resources.LoadAll<ScriptableObject>(""); private AdvancedDropdownList<ScriptableObject> ShowDropdown() { AdvancedDropdownList<ScriptableObject> down = new AdvancedDropdownList<ScriptableObject>(); down.Add("[Null]", null); foreach (ScriptableObject scriptableObject in GetAllSo()) { down.Add(scriptableObject.name, scriptableObject); } return down; } private void TargetChanged(ScriptableObject so) { Debug.Log($"changed to {so}"); editorInlineInspect = so; titleContent = new GUIContent(so == null? "Pick One": $"Edit {so.name}"); } [LayoutStart("Buttons", ELayout.Horizontal)] [Button] private void Save() {} [Button] private void Discard() {} } #endif