Releases: TylerTemp/SaintsField
3.15.1 Auto Runner & IMGUI Improvement
- Better
Auto Runner
serialization and drawer - IMGUI: Fix auto getters might fail when refreshing the resources
- IMGUI: All kind of buttons now support
IEnumerator
return type (same as UI Toolkit) - IMGUI:
Auto Runner
is now supported in IMGUI - IMGUI:
Layout
with border or foldout, can now indent a bit for array and generic type, to increase the readability - IMGUI:
Layout
foldout icon is now in gray color instead of white
(This is IMGUI; UI Toolkit already has this feature long ago)
Full Changelog: 3.15.0...3.15.1
3.15.0 AddressableResource & Auto Runner
- UI Toolkit: Add
AddressableResource
forAssetReference
inline editing - Using
Required
on addressable'sAssetReference
will check if the target asset is valid - UI Toolkit:
AutoRunner
now can specify if you want to skip the hidden fields (hidden byShowIf
,HideIf
. Not work forLayoutShowIf
,LayoutHideIf
)
Unity_SDmMsTNW2a.mp4
Full Changelog: 3.14.1...3.15.0
Note: I know recent updates did not give an implementation for IMGUI. This is because I added features I needed for my project first. I'll add IMGUI support for these features as soon as possible.
3.14.1 Validation Tool
-
Overhaul the auto getters. This might be related to #102.
The issue is because, usually you can just
SerializedProperty.SerializedObject.ApplyModifiedProperties()
. However, if the serialized target is newly created, this behavior will fail, for no good reason. This behavior is not documented in Unity's API.To resolve this, UI Toolkit will delay the action a bit later. IMGUI will attempt multiple times.
This version also makes the auto getters for list not depending on the first element drawer. This means three things:
- When working with
ListDrawerSettings
, search function will not trigger the auto getters re-running. - Draging element in list will not cause any troubles now. But the value will swap back once auto getters auto updated. (auto updating is depended on your configuration)
- Better performance, especially for IMGUI.
- When working with
-
UI Toolkit: A simple validation tool under
Window
-Saints
-Auto Runner
, related to #115This tool allows you to check if some target has
Required
but not filled. You can specify the targets as you want. Currently, it supports scenes, and folder searching.This tool is very simple, and will get more update in the future.
This tool is only available for UI Toolkit at the moment.
-
Breaking Changes: If you use
IWrapProp
, you need to change// an auto getter private string EditorPropertyName => nameof(myField);
to
// a static field (private or public, with or without readonly) private static readonly string EditorPropertyName = nameof(myField);
Unity_mwFkGmDavX.mp4
Full Changelog: 3.13.1...3.14.1
3.13.1 Bug Fix
- UI Toolkit: Fix
SaintsEditor
created many unused emptyVisualElement
- UI Toolkit: Fix rich label style might be null when falling back to IMGUI drawer
- UI Toolkit: Fix
SaintsEditorWindow
can not vertically scroll when the window is very high
Full Changelog: 3.13.0...3.13.1
3.13.0 Folder Picker
- Add
AssetFolder
to pick a folder underAssets
folder. - Add
ResourceFolder
to pick a folder under Unity'sResources
folders
using SaintsField;
[ResourceFolder] public string resourcesFolder;
[ResourceFolder] public string[] resourcesFolders;
Unity_Lcv3BKJy4w.mp4
Full Changelog: 3.12.1...3.13.0
3.12.1 Bug Fix
- Fix
RequireType
didn't give a correct component when using withinterface
, #114 - Fix
ShowInInspector
sometimes can not draw a correct value when a nested field is null
Full Changelog: 3.12.0...3.12.1
3.12.0 SaintsEditorWindow
- Add
SaintsEditorWindow
to easily make anEditorWindow
. - IMGUI: Fix
OnValueChanged
didn't work withDropdown
andAdvancedDropdown
ExamplePanel.mp4
Unity_aTUNRhhBig.mp4
Full Changelog: 3.11.0...3.12.0
3.11.0 FlagsDropdown & RuntimeAnimatorController
- Add
FlagsDropdown
to toggle flags with search support, #96 AnimatorState
now supportsRuntimeAnimatorController
type, #113- IMGUI: Fix
EnumFlags
does not support rich text
using SaintsField;
[Serializable, Flags]
public enum F
{
[RichLabel("[Null]")] // RichLabel is optional
Zero,
[RichLabel("Options/Value1")]
One = 1,
[RichLabel("Options/Value2")]
Two = 1 << 1,
[RichLabel("Options/Value3")]
Three = 1 << 2,
Four = 1 << 3,
}
[FlagsDropdown]
public F flags;
Full Changelog: 3.10.0...3.11.0
3.10.0 DrawLine & GUIColor
- Add
DrawLine
to draw a line between different objects - Add
ArrowHandleCap
to draw an arrow between different objects withoutSaintsDraw
installed - Add
GUIColor
to color a field, #107
// EColor
[GUIColor(EColor.Cyan)] public int intField;
// Hex color
[GUIColor("#FFC0CB")] public string[] stringArray;
// rgb/rgba
[GUIColor(112 / 255f, 181 / 255f, 131 / 255f)]
public GameObject lightGreen;
[GUIColor(0, 136 / 255f, 247 / 255f, 0.3f)]
public Transform transparentBlue;
// Dynamic color of field
[GUIColor("$" + nameof(dynamicColor)), Range(0, 10)] public int rangeField;
public Color dynamicColor;
// Dynamic color of callback
[GUIColor("$" + nameof(DynamicColorFunc)), TextArea] public string textArea;
private Color DynamicColorFunc() => dynamicColor;
// validation
[GUIColor("$" + nameof(ValidateColor))]
public int validate;
private Color ValidateColor()
{
const float c = 207 / 255f;
return validate < 5 ? Color.red : new Color(c, c, c);
}
Unity_ZbId8iVAhG.mp4
Full Changelog: 3.9.1...3.10.0
3.9.1 Bug Fix
- IMGUI: Fix
DrawLabel
won't work on array/list - IMGUI:
SaintsArrow
is now available in IMGUI - Fix
ReferencePicker
didn't work if the definition is inside a generic class etc. #112
Full Changelog: 3.9.0...3.9.1