- Fix
SaintsInterface
can not pick a component when there are multiple component matches #199 ReferencePicker
now gives a more friendly error if it's been used on a wrong type- UI Toolkit: fix
ResizableTextArea
did not save the changes
- Fix
SaintsEditor
can not find a correct typed drawer on first drawing after a domain reload SaintsDictionary
now can use the new fallback system, which means if you have a struct/class typed key/value, you can useLayout
,Button
etc. in it without add aSaintsRow
decorator- Fix
AnimatorParam
didn't work on anAnimatorOverrideController
animator.
- Breaking Changes:
SepTitle
arguments now aligned withSeparator
:string title
,EColor color
,EAlign eAlign
,int space
- UI Toolkit:
SepTitle
now supports rich text tags. - Fix single
Layout(keepGrouping: false)
still continuously grouping,LayoutToggle
not working,LayoutEnd(name)
did not close layout in some cases after version 4.2.0
Fix DOTweenPlay... Holy ****...
- UI Toolkit: Add
PlayaSeparator
, similar toSeparator
, but it can be applied to list/array, and layout system - Improved
Playa*
with layout system. NowPlayaInfoBox
,PlayaSeparator
will be applied to the layout if there is one, otherwise to a field/property/method
UI Toolkit: Fix IMGUI fallback in Unity 6k
UI Toolkit: Fix IMGUI fallback. The fallback flow in 4.1.3 works in Unity 6k, but not in lower version like Unity 2022. This release uses different fallback flow for it.
- UI Toolkit: Fix disable related function not working since 4.0, #194
- UI Toolkit: Fix fallback to IMGUI gave empty space drawing #193
- UI Toolkit: Fix Unity 6k changes that breaks
ResizableTextArea
- UI Toolkit: Fix
SaintsRow(inline: true)
not using inline drawing - UI Toolkit: Improved Layout for
Button
- UI Toolkit: Fix fallback to IMGUI lead to multiple drawing #193
- UI Toolkit: Fix logic of fixing out-area foldout icon
- Fix a bug that the fallback drawer can not be created if the drawer is inherited from an abstract class #192
- If a bool field is under any horizontal layout, an
LeftToggle
will be auto applied - If a struct/class/interface field is under any horizontal layout, the label will not be put into a new line
- UI Toolkit: Improve horizontal layout label (still have some issue for struct/class. Will be fixed soon)
- UI Toolkit: Fixes SerializedProperty disposed error #192
- UI Toolkit: Copy/Paste a row in
ListDrawerSettings
/Table
using either ctrl+c/ctrl+v or RMB is now supported. - UI Toolkit: Add copy/paste ability to many fields, e.g.
Tag
,Layer
,Scene
- Fix
SaintsInterface
gave an error when working with auto getters. - Add
SaintsObjInterface<TInterface>
as a shortcut forSaintsInterface<UnityEngine.Object, TInterface>
.
- UI Toolkit:
Layer
of string type should not give error when the layer name is an empty string - UI Toolkit: Add right click copy/paste ability to
AdvancedDropdown
,Dropdown
,ListDrawerSettings
&Table
- UI Toolkit: Fix an error when using
PropRange
with int type - IMGUI: Change
EnumToggleButtons
selected one with green background color
- UI Toolkit: Fix
SaintsEditor
failed to fall back a type drawer if the drawer is inheritance fromSaintsPropertyDrawer
#187 Button
now can display overload and override methods- UI Toolkit:
ShowInInspector
supportchar
type
- UI Toolkit: Fix Unity 6000 injected serialized field can not be properly drawn #184
- IMGUI:
Table
only rebuild if there are changes happened #180 - UI Toolkit:
SaintsRow
support copy/paste. Which means serializable struct/class/interface drawn bySaintsEditor
now support copy/paste just like Unity's default behavior
Fix rich text gives error if a close tag has no opening tag
Fix Enum picker
- UI Toolkit: fix
IMGUIContainer
incorrect draw height when the target field has SaintsField attributes too - UI Toolkit: fix
SaintsEditor
field won't shrink properly when the field is long
- UI Toolkit: fix fallback flow that treats
string
as array/list - UI Toolkit: fix drawer incorrect height when falling back to IMGUI drawer using
IMGUIContainer
- UI Toolkit: fix
SaintsEditor
won't draw aDecoratorDrawer
of a field
This version is a preview release. For stable release, please use version 3.36.8
- Refactor the
SaintsRow
drawer - Change the flow of how
SaintsPropertyDrawer
&SaintsEditor
in UI Toolkit fallback to drawers - UI Toolkit:
ShowInInspector
now shows a more grayed-out color for label, to distinguish from the serializable field - UI Toolkit: If you have
SaintsEditor
enabled, or have any saints property added to a serializable class/struct/interface, theSaintsRow
attribute will automatically be used if the target has no explicit drawer - UI Toolkit: If you have
SaintsEditor
enabled, the order of the property no longer matters. Things like[Range(0, 1), InfoBox("Saints InfoBox")]
will work as expected. The 3rd party drawer no longer block the saintfield drawer
This version is a preview release. For stable release, please use version 3.36.8
- UI Toolkit: Add copy/paste ability to
ResizableTextArea
- UI Toolkit: Add copy/paste ability to
PropRange
- UI Toolkit: Add copy/paste ability to
Layer
.Layer
now gives an error if the layer is not a valid value in project - Add auto validator ability to
Layer
- Fix
LayoutDisableIf
/LayoutEnableIf
/LayoutHideIf
/LayoutShowIf
not working due to previous code changes - Fix
PreferredLabel
not set for some drawers, which protentially cause some label incorrect issue in previous versions
- UI Toolkit:
Button
with parameters now support interface, class, struct type - Fix
SaintsDictionary
compile error in builds PR #179 by @Insprill
EnumToggleButtons
now allow to quick select an enum if it's not a flag. #139- Change
EnumFlags
as an alias ofEnumToggleButtons
- UI Toolkit: fix an issue when editing a valued-type key for a dictionary type using
ShowInInspector
- UI Toolkit:
ShowInInspector
can now edit a dictionary - Fix a critical issue that when a field is inherited from a
List<,>
orIReadOnlyList<,>
, some field drawer will recognize its element type wrong and fail (e.g. auto getters) - UI Toolkit: fix some fallback drawer can not display a correct label #176
- Fix AnimatorParam won't work if the target is inside a prefab which is not loaded into memory by Unity
- Fix a critical issue that when a field inherited inhered from a
List<,>
orIReadOnlyList<,>
, some field drawer will recognize it as list and fail (e.g. auto getters) - Cache MemberInfo attributes and other misc optimizations by @Insprill, PR #175
- Inherent
SaintsDictionaryBase
fromIDictionary
to make it more like a normal dictionary
- UI Toolkit:
ShowInInspector
can now create/edit polymorphism class, struct & interface - UI Toolkit: Fix
ShowInInspector
losing editing focus when editing an element inside an array/list
UI Toolkit: ShowInInspector
can now edit list/array type
- UI Toolkit:
ShowInInspector
can now edit a general class type Button
no longer gives "Method is never used" warning if you have jetbrains ide package installed (this package is installed default by Unity) PR by @Insprill
- UI Toolkit: Allow
ShowInInspector
to editor in inspector like Odin. (Does not support list/array, dictionary, null-class yet) ShowInInspector
addbyte
/sbyte
type support (PR by @Insprill)- Suppress all compiler warnings of CS0168 & CS0219 caused by preprocessors (PR by @Insprill)
ShowInInspector
no longer try to display a property without a getter
Fix auto getters won't apply changes in some cases #161
Show/Hide/Disable/Endable-If
now accept sub-fields.- rich label now support
<field />
,<field.subField/>
,<field.subField=formatControl />
to display the target field's value.
-
Add
SpineAttachmentPicker
to pick anattachment
from spine. -
Fix Spine related attributes gave error when a target
skeletonData
is missing. -
Add
LayoutCloseHere
as a shortcut of[Layout(".", keepGrouping: false), LayoutEnd(".")]
to include the current field and then close the last named layout groupLayoutCloseHere
is useful when you're done with your subgroup, but you might add some field later, but at the point you don't have a field to put aLayoutEnd
-
Add
LayoutTerminateHere
as a shortcut of[Layout(".", keepGrouping: false), LayoutEnd]
to include the current field and then ternimate the whole layout groupLayoutTerminateHere
is useful when you're done with your group, and your script is also done here (so nowhere to putEndLayout
). Oneday you come back and add some new fields, this attribute can avoid them to be included in the group accidently. -
Add
DefaultExpand
andArrayDefaultExpand
-
Remove
defaultExpanded
fromTable
, useArrayDefaultExpand
instead
- UI Toolkit: fix
Table
add/remove button can not click after version 3.32.0 Table
addbool defaultExpanded=false
,bool hideAddButton=false
,bool hideRemoveButton=false
parameters #125
- Change the layout of
EnumFlags
so it can handle a large enum without displaying a super long list - Breaking Changes:
AutoExpanded
is removed fromEnumFlags
- Add constructor for
SaintsDictionary<,>
so it can be created exactly like a standard c-sharpDictionary<,>
- If the key/value for
SaintsDictionary<,>
is a general class/struct which already has a custom drawer, use that custom drawer rather than flat it. - Fix
SaintsDictionary<,>
can not detect the serialized field when get inherited
- Add
Adapt
which can work withPropRange
- Add
PropRange
support forAuto Validator
9 - UI Toolkit: fix
OverlayRichLabel(end: true)
incorrect overlap - IMGUI: update
Table
on every draw #157
- Add Auto Validator for
MinValue
, fixMinValue
not get called on first inspecting of the field in IMGUI. FixMinValue
use shared error message when using on a list in IMGUI. - Same fix for
MaxValue
- Refactor IMGUI drawer when no attribute is provided
Scene
add a parameter to allow to save a full-path scene name in build rather than just the nameParticlePlay
now will disable the button if the target gameObject is not active. It no longer report an error if the target isnull
. UseRequired
for this purpose.- Rename
FuckDOTween
toDOTweenDetectPanel
#152 - Add
EXP.ForceReOrder
to config auto getters to re-order the result (old behavior). This will make the list/array un-reorderable. #153
ArraySize
now support callback argument to dynamically limit the size.- UI Toolkit: fix a bug that
ListDrawerSettings
without paging can not set the size correctly.
SaintsDictionary
now can flatten fields the key/value of a general strict/classOnButtonClick
andOnEvent
in UI Toolkit now can check the event signing while the target is being inspected- Remove a log when rich label has a bad label format
Expandable
now support addressable reference- UI Toolkit:
Expandable
now support aGameObject
Add SaintsDictionary<,>
. It allows:
- Allow any type of kay/value type as long as
Dictionary<,>
allows - Give a warning for duplicated keys
- Allow search for keys & values
- Allow paging for large dictionary
- Allow inherent to add some custom attributes, especially with auto getters to gain the auto-fulfill ability.
Fix auto getters didn't refresh the sources when hierarchy changed #150
- Add
SphereHandleCap
which can draw a sphere in the scene - Breaking Changes: change the arguments of
DrawLabel
to support dynamic color, arguments ofDrawLine
,DrawArrow
for better usage case support AdvancedDropdown
now can accept anyIEnumerable<object>
return type- Add alpha argument for
GUIColor
when usingEColor
parameter
Note: all Handle
attributes (draw stuff in the scene view) are in stage 1, which means the arguments might change in the future.
- Add
DrawWireDisc
to trace an object in the scene drawing a disc. AdvancedDropdown
now will use all the static value from the type when you omitfuncName
.
- Add
TableColumn
to merge multiple columns into one - UI Toolkit: all buttons that returns
IEnumerator
now will display a loading icon when the coroutine is running - fix
Table
can not disable related buttons when using withArraySize
- IMGUI: fix multiple target editing gives error when table sizes are not equal, #140
- Auto getters on lists/array now no longer force the target to be ordered as what the resources are found, #145
- IMGUI:
Expandable
now internally usesSaintsRow
for a better rendering result #142 - IMGUI: Fix a bug that when you select an object, then select nothing, then select back, some attribute might get broken with disposed target error
- IMGUI: Fix a potential bug in auto getters
- Fix
Troubleshoot
didn't display a completed status
- Add
SpineSlotPicker
- UI Toolkit:
AdvancedDropdown
remove logs when searching
- IMGUI: fix
Table
didn't update when size is changed externally - Fix
Table
drag and drop - Fix
ListDrawerSettings
drag and drop #127
-
Optimize auto getters. Some auto getters now will use Unity's built-in API first which is way faster than the
XPath
logic.They'll also only refresh the hitting resources when you have changes in project (rather than inside a fixed loop)
-
Add
SpineSkinPicker
to pick a spine skin from a spine skeleton. -
Improve auto getters how they find the scene for
scene::
selector. -
Fix
I2Loc
package compile error on build.
- IMGUI:
LocalizedStringPicker
is now supported in IMGUI too. - (Experimental): Optimize auto getters. This feature is disabled by default. Add
SAINTSFIELD_AUTO_GETTER_RESOURCE_OPTIMIZE
to try. This feature will be enabled by default when it's stable.
- UI Toolkit: Add
LocalizedStringPicker
for I2 Localization. Enable it inWindow
-Saints
-Enable I2 Localization Support
- UI Toolkit: fix data didn't get saved if the fallback drawer is a IMGUI drawer
- UI Toolkit: fix
ResiziableTextArea
didn't update the display when the value is changed by external code. - UI Toolkit: fix
AdvancedDropdown
search might miss some results when multiple value uses the same last name. - UI Toolkit: now
AdvancedDropdown
support search for paths too (previously only support value search). This is only avaiable for UI Toolkit because IMGUI uses Unity's built-in version and lack of this ability. - UI Toolkit: now
AdvancedDropdown
search will display its parent path.
Add SaintsField.Playa.SaintsNetworkBehaviour
to allow rendering Button
etc. inside Unity's Netcode for Game Objects behavior.
- Add
AddressableScene
to pick a scene fromAddressable
assets - Move
Addressable
related function to a separatedasmdef
for a better code organization
- UI Toolkit: Fix
ListDrawerSettings
didn't update the total count when size is changed externally #123 - UI Toolkit: Fix
ValidateInput
has debug log #134 - Improve the logic of
Troubleshoot
so it can detect method etc. - IMGUI: Fix
InfoBox
show extra space when hidden #126
- Fix
ListDrawerSettings
can not detect a size change and update display #123 - Fix UI Toolkit code leak to IMGUI version #124
- Add
Table
to show a list/array of class/struct/ScriptableObject
(orMonoBehavior
if you like) as a table - Add
Window/Saints/Troubleshoot
to quickly check why some attributes not working. - UI Toolkit: Fix
AdvancedDropdown
won't update the label when the value is changed externally. - Fix
SpineAnimationPicker
made the project unable to build.
- IMGUI:
SpineAnimationPicker
is now supported in IMGUI too. - Modify the icon of
SpineAnimationPicker
to be more clear.
-
Add
SpineAnimationPicker
to pick a spine animation.Spine
has Unity Attributes likeSpineAnimation
, but it has some limit, e.g. it can not be used on string, it can not report an error if the target is changed, mismatch with skeleton or missing etc.SainsField
's spine attributes allow more robust references, and are supported byAuto Validator
tool, with searching supported. -
Rename
Auto Runner
toAuto Validator
-
Add
Scene
validation inAuto Validator
- Add
ShaderParam
to select a shader parameter from ashader
,material
orrenderer
- Add
ShaderKeyword
to select a shader keyword from ashader
,material
orrenderer
- UI Toolkit: if the color is not in the
ColorPalette
, it will give a warning icon. ColorPalette
now supported by auto runner validation.- Fix auto runner extra resources won't work with GameObject type.
- UI Toolkit: fix
Button
IEnumerator broken - IMGUI:
ColorPalette
is now supported in IMGUI
UI Toolkit: fix button Enumerator
UI Toolkit: fix fallback drawer with decorator attribute(s).
- UI Toolkit: Add
ColorPalette
to pick a color from a list of colors (IMGUI support will be added later) - IMGUI: Fix drawer fallback issue #119
- UI Toolkit: Fix drawer can not fall back if a third party attribute is in the middle of attributes
- Fix
Button
gives errors when using non-dynamic label with somePlaya*
attributes
Button
label now support rich text, and also support dynamic callback text- Fix auto getters gives errors when the list/array need to reduce the size
- Auto Runner now can check the
OnValidate
method, and will notice you if the method throw an error and/or make aDebug.LogError
- Fix auto getters throw an error if the target asset doesn't match some required condition
- Auto Runner no longer serialize the result into the file
- Fix Auto Runner can not properly display the field because the scene gets close during the process
- Auto Runner now will allow you restore your opened scenes after finished
- Add an Auto Runner example code so you can easily make a target assets group for validation
- Fix auto getters won't work if multiple targets use the same field name for array/list
- IMGUI:
AddressableResource
is not supported in IMGUI too
-
ValidateInput
is now supported by Auto Runner. -
AboveImage
,BelowImage
,AssetPreview
now works on AddressableAssetReference
type. -
UI Toolkit:
ValidateInput
now only run when:- the inspecting target is changed
- the project is changed
- some assets are changed
instead of every 100 ms. You can still enable the loop checking in
SaintsConfig
-
Change Auto Runner so you can have multiple config for different purposes.
- Auto runner now supports auto getters!
- UI Toolkit: fix auto getters update loop won't get triggered
- Fix auto getters can not process
SaintsInterface
correctly - Improve the performance of auto runner, also give a dialog message if the opening scene is dirty
- 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
- 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
)
-
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);
- 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
- Add
AssetFolder
to pick a folder underAssets
folder. - Add
ResourceFolder
to pick a folder under Unity'sResources
folders
- Fix
RequireType
didn't give a correct component when using withinterface
- Fix
ShowInInspector
sometimes can not draw a correct value when a nested field is null
- Add
SaintsEditorWindow
to easily make anEditorWindow
. - IMGUI: Fix
OnValueChanged
didn't work withDropdown
andAdvancedDropdown
- Add
FlagsDropdown
to toggle flags with search support, #96 AnimatorState
now supportsRuntimeAnimatorController
type, #113- IMGUI: Fix
EnumFlags
does not support rich text
- 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
- 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
- UI Toolkit: Add
SaintsArrow
to draw arrows in the scene (IMGUI support will be added later) - UI Toolkit: Fix auto-getters get looped calls when changing ordered in an array/list
- Add
PositionHandle
which can change position of target field in scene view. The target can be either aGameObject
, aComponent
, or a Vector2/Vector3 target. - IMGUI: fix
DrawLabel
won't disappear when you select away - UI Toolkit: fix auto-getters might get looped calls in list/array
- UI Toolkit: fix
AnimatorParam
can't display the correct label withRichLabel
DrawLabel
now support to draw a label for aVector2
orVector3
field withSpace
argumentAnimatorState
now supportAnimatorOverrideController
UI Toolkit: Fix PlayaInfoBox
won't hide when show
returns false
- UI Toolkit: All the buttons now support
Coroutine
. If the target function returns anIEnumerator
, the button will start a coroutine and wait for it to finish. - UI Toolkit: Fix
ProgressBar
won't display updated value if the value is changed externally.
- Add
LayoutShowIf
,LayoutHideIf
,LayoutEnableIf
,LayoutDisableIf
to toggle show/enable status of an entire layout group. #100, #73 - Fix auto getter accesses disposed property in some cases in
SaintsEditor
- IMGUI: Fix accessing disposed
SerializedProperty
, #102 - IMGUI: Split config for auto getters from UI Toolkit, and change the default behavior of IMGUI auto getters to be never update while on inspector (same as old behavior of auto getters). Might be related to #98
- IMGUI: Fix
RichLabel
has some indent and truncate issue withLeftToggle
andResiziableTextArea
- Fix Auto Getters won't work if you disabled the update
- UI Toolkit: Remove some unnecessary call to improve some performance
- UI Toolkit: Now scene view will notice you if there is an auto-getter signed a value to a field.
- Fix auto getters
includeInactive
checked thegameObject
itself is enabled, but should beactiveInHierarchy
, #103. - Add
DrawLabel
handle to draw label in the scene view, #95 - Improve the logic of how
SaintsField Config
is loaded to reduce the times of loading the config. - UI Toolkit: fix auto getters won't work if you completely disable the update loop.
Since this version we start to use the semantic versioning
for version number.
- Fix multiple auto getters on a same field will cause partly filled values.
- Add
bool delayedSearch = false
forListDrawerSettings
to delay the search until you hit enter or blur the search field
-
Performance improvement, mainly for UI Toolkit, and partly for IMGUI, #98
-
SaintsFieldConfig
adddelay
andupdate interval
for auto getters so you can have better control about it.It's recommended to set
delay
to 100 andupdate interval
0 (means disabled), because usually you'll not need to frequently check the resources. Everytime clicking on the target will do an update, which is enough for most cases.
-
UI Toolkit: Fix an issue with
MinMaxSlider(free: true)
that the high/low is jump back to code value when you input an out-ranged value, then slide back to in-range value -
Fix
Button
won't work if there are two methods with the same name (but different arguments overload) in the same class, #104 -
UI Toolkit: Fix
OnValueChanged
won't get triggered when aSerializeReference
field is changed, #97Known Issue:
Unity changed how the
TrackPropertyValue
andRegisterValueChangeCallback
works. Using on aSerializeReference
, you can still get the correct callback, but the callback will happen multiple times for one change.Using
OnValueChanged
on an array/list ofSerializeReference
can cause some problem when you add/remove an element: theConsole
will give error, and the inspector view will display incorrect data. Selecting out then selecting back will fix this issue. However, you can just switch back to the old way if you do not care about the field change in the reference field, (Because Unity, still, does not fix related issues about property tracking...) by clickingWindow
-Saints
-Create or Edit SaintsField Config
and change the config here.These two issues can not be fixed unless Unity fixes it.
-
SaintsEditor
: AddOnArraySizeChanged
to watch the array size change, #97
Fix not work with Unity < 2021.3
SaintsRow
now support managed reference type. #80- Add
Window/Saints/Create or Edit SaintsField Config
config tweak so you can change the default behavior of auto getters. #72 - UI Toolkit: fix auto-indent for foldout in nested layout can incorrectly indent some fields.
Fix a bug that low/high input in MinMaxSlider
with free: false
won't work and get reset to min/max value, #94
- Add
EUnique.Remove
,EUnique.Disable
forDropdown
&AdvancedDropdown
. When using on a list/array, a duplicated option can be removed or disabled. - IMGUI:
Expandable
fix repeatedly creatingSerializedObject
and lead to un-editable fields. Possibly related to #78 - IMGUI: many IMGUI only parameters are removed from
AdvancedDropdown
.
- Using
Dropdown
/AdvancedDropdown
directly on an enum field (without specifying the callback) will allow you to pick up one enum, despise whether the enum is[Flags]
or not. This is useful when you want to pick up one enum value. #81 - Using
RichLabel
on an enum will allowDropdown
/AdvancedDropdown
to change the name displayed for each enum item. TheEnumFlags
will also change the button's name accordingly. Please note: only standard Unity's RichText label is supported yet. Extended tag like<icon>
,<label>
and extended color name will not be supported at the point.
- Fix
OnEvent
andOnButtonClick
saving target incorrect and gives error. - Fix
GetByXPath
failed to find the correct target.
- Fix
OnEvent
andOnButtonClick
wouldn't save the result. - Fix
Dropdown
andAdvancedDropdown
gave error when working withlong
type, #92 - Re-paint icons used in this project
UI Toolkit: fix MinMaxSlider
with free
can display wrong slider when manually input.
Allow free input value in MinMaxSlider
if you manually input int the field, #48
UI Toolkit: Fix Get*
attributes won't save the value
- Fix
GetComponentInScene
won't search a disabled object - Fix auto-getter attributes support for
SaintsInterface
- IMGUI: fix
OnValueChanged
did not work
- UIToolkit: Fix
ShowInInspector
won't disable the updated value - Fix
LayoutEnd
will make the following fields visible likeShowInInspector
- Add
DOTweenStart
as an alias ofDOTweenGroup
This upgrade contains Breaking Changes! Though it will not break your code, but some behavior is adjusted. Please read before upgrade.
Bug Fix:
- UI Toolkit: Fix
FieldType
won't update the value if the value is changed externally. - Fix value sign error if the field is in a list/array in some cases.
Breaking Changes:
Since this version, GetComponent*
, FindComponent
, GetPrefabWithComponent
, GetScriptableObject
is inherent under GetByXPath
(which will be documented separately). The behavior for these attributes is changed as:
-
If target is mis-matched, it'll be auto-resigned to the correct value. (Except
GetComponentByPath
, which will give you a reload button) -
If the target is not found, it'll be auto-resigned to null. (Except
GetComponentByPath
, which will give you a remove button) -
All attributes optionally receives
EXP
as the first argument, which has:NoInitSign
: do not sign the value if the value is null on firsts rendering.NoAutoResignToValue
: do not sign the value to the correct value on the following renderings.NoAutoResignToNull
: do not sign the value to null value if the target disappears on the following renderings.NoResignButton
: whenNoAutoResign
is on, by default there will be areload
button when value is mismatched. Turn this on to hide thereload
button.NoMessage
: whenNoAutoResign
andNOResignButton
is on, by default there will be an error box when value is mismatched. Turn this on to hide the error message.NoPicker
: this will remove the custom picker. This is on by default (if you do not passEXP
as first argument) to keep the consistency.KeepOriginalPicker
: UI Toolkit only. By default, when a custom picker is shown, Unity's default picker will hide. This will keep Unity's picker together.Silent
=NoAutoResign | NoMessage
. Useful if you want to allow you to manually sign a different value with no buttons and error box.JustPicker
=NoInitSign | NoAutoResignToValue | NoAutoResignToNull | NoResignButton | NoMessage
. Do nothing but just give you a picker with matched targets.Message
=NoAutoResignToValue | NoAutoResignToNull | NoResignButton
. Just give an error message if target is mismatched.
All these attributes except GetComponentByPath
uses EXP.NoPicker | EXP.NoAutoResignToNull
as default.
Upgrading from previous version, you may notice:
- As these attributes complain less when missing the target, you may want to add a
[Required]
together. - If you have same component added multiple times on the same target, it might only find the first one of them.
I'll update the document about GetByXPath
soon.
Experimental IMGUI for GetByXPath
ArraySize
allow to set range, implements #77- If you have
ListDrawerSettings
enabled, theAdd
andRemove
buttons will be disabled/enabled accordingly if you also haveArraySize
- Improve logic and fix some bugs for
ListDrawerSettings
for IMGUI - Experimental
GetByXPath
fix predicates parsing
- Use
AdvancedDropdown
forReferencePicker
, implement #87 - UI Toolkit: Fix
AdvancedDropdown
long text align, fix no auto-focus in search field
Experimental Feature
Since this version, a new attribute called GetByXPath
is added (only support UI Toolkit yet). This attribute is designed to be the super class of GetComponent*
, GetPrefab
etc.
I'm still working on it, but most used features are already there. The API is not documented yet. The syntax only has some notes in Chinese if you're interested.
I'm actively working on this feature, hopefully to make it available ASAP. In the meantime, I now start to processing all the pending issues.
Fix broken addressable support due to last version's refactor.
-
Fix inconsistent log of
ShowIf
andHideIf
(alsoPlayaShowIf
,PlayaHideIf
):- As
[ShowIf]
will show the field, now[HideIf]
will hide the field. - The
Or
logic is not completely correct forHideIf
, especially withEMode
config.
- As
-
Now you can use
[ShowIf(false)]
,[HideIf(true)]
to directly show or hide the target field. -
UI Toolkit: fix array/list/struct foldout out of space when using
Layout
- Fix
PlayaShowIf
/PlayaHideIf
could not be used more than once on the same target. - IMGUI: Fix missing decorators. If you see duplicated decorators in your project, go:
Window
-Saints
-Enable IMGUI duplicated decorator fix
. - IMGUI: Fix inconsistent height update for
InfoBox
andResiziableTextArea
in Unity 2022.3.46, #85. - IMGUI: Fix
PostFieldButton
,AboveButton
,BelowButton
use shared error message when in a list/array. - Change
null
value color forShowInInspector
. - Fix
ShowInInspector
can not detect a dictionary when the target isIReadOnlyDictionary<,>
- UI Toolkit now can fall back to an IMGUI custom drawer if the target field is specified to be drawn by an IMGUI drawer (note:
<icon>
inRichLabel
will not work and will get removed). - Change the order of static/readonly field of
ShowInInspector
so it can stay at the position where it declared. Change the order ofproperty
to be abovemethod
. - Fix compile error on old Unity version.
ColorToggle
supportsGraphic
(text
,TMP_Text
,Image
etc). #83
- Fix
Required
not work on every element of list/array. - Fix
RichLabel
etc. failed to find a correct fallback drawer likeUnityEvent
Fix Dropdown
& AdvancedDropdown
not work on list/array.
This upgrade CONTAINS BREAKING CHANGES, read before you upgrade.
- Breaking Changes:
InfoBox
now default at top. parameterabove
has been renamed tobelow
. If you use[InfoBox(..., above: true)]
, you will need to remove theabove
, or change it tobelow
- Add
BelowInfoBox
to show at below. - Fix
Attribute
-s finding error when there is anabstruct class
in inherent, related to #79 - Add
LayoutStart
as an alias ofLayoutGroup
.LayoutGroup
is now deprecated (not removed). - Add
PlayaInfoBox
for any property/field/method with rich text supports, implements #71 - IMGUI: fix incorrect display for
Separator
whenEAlign
isEnd
. $
prefix to set parameter as a callback/property
- Improved
LayoutGroup
which supports./GroupName
to add nested subgroup. #67 - IMGUI: better visual display for
TitledBox
,FoldoutBox
and foldout tabs. #64
GetResourcePath
etc. support some build-in object types like AudioClip
. #69
- IMGUI: fix
Expandable
won't save the changed value. - Fix
Required
won't work in parent of an inherited class. - Fix
FieldType
won't work in array/list. - Allow
FieldType
withcompType=null
to by-pass the issue that Unity won't show all the prefabs with expected component in the picker.
- IMGUI: fix disposed access.
- IMGUI: fix
ProgressBar
dragging changes all instance inside array.
- Fix possible disposed attribute access, fixes #62
- Pause
GetComponent*
,GetScriptableObject
,OnButtonClick
etc. when entering play mode
- Rich label now supports
<container.Type />
to display the class/struct name of the container of the field, and<container.Type.BaseType />
. Separator
to draw text, separator, spaces for field on above / below with rich text & dynamic text support.Layout
,LayoutGroup
now supportsmarginTop
,marginBottom
, fixes #52- IMGUI: fixes
Layout
broken insideSaintsRow
-
Breaking Changes:
GetComponentInChildren
,GetComponentInParent
,GetComponentInParents
will search the target itself, which means it's now the same behavior as Unity's build-in functions. No more surprises. Fixes #56 -
Breaking Changes:
GetComponentInParents
now havebool includeInactive = false
as the first argument to align with Unity's build-in function. Be aware this might break your existing code -
GetComponentInChildren
,GetComponentInParent
,GetComponentInParents
now havebool excludeSelf = false
argument to exclude the target itself from searching. -
OnEvent
name now support dot to fetch property -
Breaking Changes: Since this version, for
Enable
/Disable
/Show
/Hide
-If
, theEMode
argument now has the same operation logic with other arguments (in previous version it has a higher priority to shadow other arguments). This might break your existing code. -
ShowInInspector
now can show a dictionary (or any object implementsIDictionary<,>
), fixes #57 -
ShowInInspector
now can show public fields & properties of any type
-
Add
ELayout
shortcut:TitleBox
=Background | Title | TitleOut
FoldoutBox
=Background | Title | TitleOut | Foldout
CollapseBox
=Background | Title | TitleOut | Collapse
And improve the appearance for UI Toolkit with foldout/collapse + title.
-
UI Toolkit:
Layout
now have some space with fields -
Fix drawer fallback not work for array/list
-
Fix possible property disposed access
-
UI Toolkit: Improved
AdvancedDropdown
position -
Fix
ListDrawerSettings
error when searching a enum field -
ListDrawerSettings
now can search the child field when the target is aScriptableObject
- Fix
EnableIf
not work with Value Comparison - Fix #42 GetComponent etc need better error handling and report
- Fix callback won't fill null parameter value when the value of the target is null
- Deprecated
PlayaArraySize
. Just useArraySize
instead. - Fix
SaintsInterface
drawer did not work inside array. - #45: Now
GetComponent*
works with array/list, and will be auto filled if you haveSaintsEditor
enabled. - UI Toolkit: Fix
AdvancedDropdown
out of screen.
Value Comparison for Show/Hide/Enable/Disable-If
Now the string can have !
prefix to negate the comparison.
And ==
, !=
, >
etc. suffix for more comparison you want.
AssetPreview
now will load the preview of thegameObject
if the target is aComponent
. Useful when you use a script type to reference a prefab.- Fix
SaintsInterface
won't work when T is a super class of ScriptableObject. - Breaking Changes:
ISaintsArray
has been removed, useIWrapProp
instead. - Now most decorators can be used on
SaintsArray
,SaintsList
andSaintsInterface
. - Now
Dropdown
andAdvancedDropdown
supports struct value too. - Add document for
SaintsArray
,SaintsRow
about custom drawer.
- Fixed:
AssetPreview
should not destroy the texture and lead to empty image. - UI Toolkit: Better
ELayout.TitleOut
with foldout mode for[Layout]
. - Add
ListDrawerSettings
to search and paging a large list/array.
- Layout system now have
LayoutGroup
,LayoutEnd
to quickly group many fields together. - DOTweenPlay tools now have
DOTweenPlayGroup
,DOTweenPlayEnd
to quickly group many DOTweenPlay methods together. - Layout now use the last config for the target group, this is useful when you want to inherent but want to change config of parent's Layout group.
Note: This version re-worked the layout system and might break the existing functions. Report a bug if you face any issues.
UI Toolkit: Fix #35 float [MinMaxSlider]
read min value to max value when using input rather than slider.
- (by @Lx34r) Fix foldout display error with tab in Layout Attribute #33
- Fix #34 that Unity will dispose the serialized property first before destroy the drawer, leading to errors when drawer is in an array and the target element gets removed.
Button
now allows to have parameters and you can change the value in inspector.- If you have
DOTween
installed without ASMDEF enabled, there will be a popup window to ask you either enable it, or disable SaintsField's DOTween ability.
SaintsInterface
for serializing interface of a UnityEngine.Object
type (or sub type).
Special thanks for @dbc's answer in stackoverflow
Fix in some Unity version (tested on 2022.3.20) a cached struct object can not correctly report the value inside it after changing #29
- Fix
ResourcePath
not work onScriptableObject
- UI Toolkit: fix
Layer
won't save the changed value #28
SaintsEditor
now haveOnEvent
to bind a method to your customUnityEvent
- Fix fallback system broken on generic types #27
SaintsEditor
now have OnButtonClick
to bind a method to a button click event.
Fix can not check if a type is a subclass of another generic type, and failed to use the custom drawer. #23
- IMGUI now can fallback to CustomPropertyDrawer of data type (previously only PropertyAttribute drawer)
- Add
DOTween
detect usingDOTWEEN
marco added byDOTween
when setup - UI Toolkit: Fix
DOTweenPlay
,ParticlePlay
button on Unity before 2022.2 which usesunityBackgroundScaleMode
ShowInInspector
now support to show array/list- Fix
ShowInInspector
and some other SaintsEditor tool might not find the correct target in some case (especially insideSaintsRow
)
- UI Toolkit: fix
DecoratorDrawer
get drawn more than once. - Add
Enum
support forShowIf
/HideIf
/EnableIf
/DisableIf
/PlayaShowIf
/PlayaHideIf
/PlayaEnableIf
/PlayaDisableIf
- Improve
SaintsArray
so it works more like an actual array.
- UI Toolkit: fix
AddressableAdress
broken since 3.0.0 - UI Toolkit: fix dropdown button incorrect layout (
Dropdown
,AdvancedDropdown
,AddressableAdress
etc) - UI Toolkit: allow buttons to wrap if
EnumFlags
has both theAutoExpand
andDefaultExpand
asfalse
- UI Toolkit: fix
NavMeshAreaMask
incorrect label align. - Addressable tools now can open addressable groups edit window.
- AnimatorParams now can open the animator edit window.
- Fix
AnimatorParams
for integer type.
- UI Toolkit: Fix
SaintsEditor
"Script" field not aligned - Fix Issue 20 that
EnumFlags
check contains for mixed bits, and flip bits when toggling a mixed bit. - UI Toolkit: fix
EnumFlags
layout issue.
-
Completely rewrite UI Toolkit components with
"unity-base-field__aligned"
class. Since this version, UI Toolkit will no longer have the weird label width issue.The
UI Toolkit Label Width Fix
function is now disabled and removed. -
TryFixUIToolkit
inSaintsEditor
is now deprecated. -
[UIToolkit]
(used for label width fixing) attribute is now deprecated -
ShowAboveImage
/ShowBelowImage
now useFieldStart
as default align. -
IMGUI: fix
PlayaRichLabel
forSaintsRow
-
UI Toolkit: fix
ShowInInspector
won't update values for non-serialized fields -
UnsaintlyEditor
is removed
-
Since this version, UI Toolkit now can property fallback to
CustomPropertyDrawer
of a custom type (previously it only supports to fallback to customPropertyAttribute
drawer).Note: this feature is only for UI Toolkit. IMGUI does not support this feature.
Note: combining with
RichLabel
, UI Toolkit will find the firstunity-label
class label which in some case might not be correct. This feature can not be turned off yet. Please report issue if you face any problem. -
SaintsList
/SaintsArray
fix working withRichLabel
, fix deep nesting rendering issue.
- Add
PlayaRichLabel
for array label modification. - Fix callback for
OnChanged
,RichLabel
etc. sometimes can not get a correct callback parameter filled.
- Add
SaintsArray
,SaintsList
for nested array/list serialization. - IMGUI: Change the logic of how rich text is rendered when the text is long.
- Fix
AnimatorStateChanged
not excluded Editor fields.
- Add
ParticlePlay
- Remove a forgotten log in
SaintsEditor
UI Toolkit. - Add
PlayaArraySize
which can deal with 0 length array/list.
- Add
ArraySize
- UI Toolkit: Fix
ShowInInspector
for property that the equal operation is incorrect and repeatedly destroy and create elements. Fix a UI Toolkit weird bug that can not update values. - UI Toolkit: Fix
EnumFlags
icons not display.
- IMGUI: Fixes #9 a typo that breaks the
AnimatorState
.
- Fixes #9
AnimatorState
won't work for sub-state machines. AnimatorState
now allow class/struct with satisfied fields.- Fix
AnimatorState
can not property display an error when the target is not found, or the target has no controller. AnimatorState
now has aEdit {yourAnimatorController}...
option to directly open the animator controller.
-
Fix
AssetPreview
incorrect time to destroy the preview texture. -
UI Toolkit: Fix
Dropdown
giving error when working withRichLabel
. -
Allow
EnumFlags
to be expanded withDisabled
state. -
IMGUI: Fix
EnumFlags
sometimes need click more than once to expand -
IMGUI:
ReadOnly
(DisabledIf
etc) now disable the whole field rather than the value field only. -
Expandable
now works properly withReadOnly
(DisabledIf
etc):- The toggle will never be disabled
- IMGUI: The field will be disabled accordingly. (In UI Toolkit they will not be disabled because of the limitation from Unity)
- UI Toolkit: fix labelWidth didn't get fixed unless you change the layout (e.g. resize the inspector)
- UI Toolkit: fix
AdvancedDropdown
didn't display a label because of last version's fix. - UI Toolkit:
AdvancedDropdown
now use the width of the full field. - UI Toolkit:
AdvancedDropdown
now hide breadcrumbs if it's not a nested list, thus it looks more like a normal dropdown when you use it as a searchable dropdown. - Custom object picker now share the same preview scales between all instances, making it feels more like the Unity's default picker.
- Custom object picker preview panel now have a background color to distinct it from the select area.
- Custom object picker search field now have a "clean" button. Due to some IMGUI limitation, clicking it will make the input field LOSE focus.
Fix the UI Toolkit buggy label width, finally!
- UIToolkit: when using a long label, the label will take more space (rather than be truncated in the previous version). Now it behaves the same as UI Toolkit components.
Scene
attribute now have a "Edit Scenes In Build..." option to directly open the "Build Settings" window where you can change building scenes.InputAxis
attribute now have a "Open Input Manager..." option to directly open "Input Manager" tab from "Project Settings" window where you can change input axes.SortingLayer
attribute now have a "Edit Sorting Layers..." option to directly open "Sorting Layers" tab from "Tags & Layers" inspector where you can change sorting layers.
As the most bothering issue fixed in UIToolkit, I'm now removing "experimental" from UIToolkit support. If you face any issue, please submit in Github Issue Page.
Considering the following labels with UI Toolkit enabled:
public string itsALongRideForPeopleWhoHaveNothingToThinkAbout;
public string aBitLongerThanDefault;
public string s; // short
By default (or with PropertyField
from UI Toolkit), Unity display it as this (it's a IMGUI style even with UI Toolkit on):
Now, let's apply any UI Toolkit component (except PropertyField
), it will (surprisingly!) use the modern UI Toolkit flavor label layout:
This inconsistency can make your inspector looks sooooooo weird and very funny because of un-aligned fields. This problem is reported to Unity but never got fixed. Considering:
// default field with UI Toolkit, Unity will truncate it to IMGUI width, instead of UI Toolkit flavor
public string thereIsSomeGoodNewsForPeopleWhoLoveBadNews;
// UI Toolkit component! Unity will grow the space like UI Toolkit
[UIToolkit] public string weWereDeadBeforeTheShipEvenSank;
// another default, Unity will use the IMGUI style width (some mix of a percent, min-width and caculation result) instead of UI Toolkit
public string myString;
// another UI Toolkit component! Unity will use the UI Toolkit style width (120px) like UI Toolkit
[UIToolkit] public string myUiToolkit;
The field indent is a mess, even you're sticking to the UI Toolkit inspector:
This issue is so difficult to solve, that even OdinInspector does not try to fit it. (Or maybe they just don't care...?)
SaintsField now use some trick to make PropertyField
label behaves much more like the vanilla UI Toolkit component:
That means:
- Label will by default get 120px width, which is UI Toolkit's default
- The space gets grow to fix the label when the label gets longer, which is also UI Toolkit's default
- If you have a very looooong label, the value field will be shrank out of view. This is also how UI Toolkit works.
- Add
[Conditional("UNITY_EDITOR")]
for attributes so it won't be included in your build. - Fix example scene will break the build (if you import it in your project).
- Fix
InfoBox
can not get correct callback when it's nested inside an array. - Add
ResourcePath
to get a string path of a resource which allows you to specific required types, and have a custom object picker.
Rate
: no longer frozen the first star if the range starts from 1.- UIToolkit
MinMaxSlider
: incorrect update min/max value when there is an error. - Fix
EnumFlags
IMGUI incorrect height result because Unity will give width=1 during rendering IMGUI for the first time... FixEnumFlags
incorrect field type checking and did not work insideSerializable
. - Fix
Rate
,PropRange
(IMGUI) do not immediately update the value when it's inside aSerializable
.
- Add
RequireType
. This attribute allow you to specify the required component or interface for a field. FieldType
now has a custom object picker window. By default Unity disallow to see an asset with a specific type because of "performance consideration". Ironically, if you directly use a component type instead of aGameObject
, Unity WILL show a correct asset picker. As this can not be "hacked" or "tricked" to let Unity show the correct picker, the custom object picker will allow you to pick a object (e.g. a prefab) with the component you want.
- Fix Issue 8 that most attributes in
SaintsField
did NOT looking for the inherited parent target... This includesPropRange
,Min
,Max
,Dropdown
,AdvancedDropdown
,SpriteToggle
,MaterialToggle
,ColorToggle
,RichLabel
,Above/BelowRichLabel
,InfoBox
, Buttons etc. - Fix
Dropdown
andAdvancedDropdown
incorrect parent finding which may lead to incorrect dropdown items. - Most callbacks now can receive the value of the target field. Allowing a suitable required/optional parameter in the callback to make it work.
This update does not break existing APIs, but greatly changed internal logic of property/method finding, so it's a minor version bump.
Special thanks to ZeroUltra to find this important issue.
- Fix issue 7: when Unity uses
NativeProperty
to inject property with native code and serialized property,serializedObject
will still give correct serialized fields, but reflection will not work, makingSaintsEditor
failed to display some fields. - Remove default
SaintsEditor
for example scene, so people who imports it (most likely when usingunitypackage
) won't accidentally getSaintsEditor
enabled for the whole project. - Fix a bug that possibly break
rate
in some situation. - IMGUI: fix
SaintsEditor
display an emptyMonoScript
when the target is neitherMonoBehavior
norScriptableObject
.
- IMGUI: Fix
SaintsRow
incorrect renderer cache when inside a list. - Fix
ReadOnly
will disable the field when there is an error in your callbacks. - Add
EMode
forReadOnly
,EnableIf
,DisableIf
,ShowIf
,HideIf
to specific if editor is playing or not. - Breaking Changes:
ReadOnly
,EnableIf
,DisableIf
,ShowIf
,HideIf
no longer support directValue and groupBy parameters. SaintsEditor
: AddPlayaDisableIf
,PlayaEnableIf
,PlayaShowIf
,PlayaHideIf
- Fix Issue 3 Texture2D can not be destroyed on a GC calling.
- UI Toolkit: Fix Issue 2 incorrect readonly.
- Fix
HideIf
inconsistent logic of being opposite ofShowIf
. - Add
EnableIf
,DisableIf
- Add
SaintsRow
forSerializable
class/struct to draw Button/Layout/DOTweenPlay for the target field. - Fix
AboveImage
/BelowImage
gives error instead of display nothing when the SpriteRenderer/Image/RawImage does not have a sprite.
RichLabel
,AboveRichLabel
,BelowRichLabel
,OverlayRichLabel
,PostFieldRichLabel
now can receive the value and/or the index (if it's in a list/array) in the callback function.- IMGUI: fix incorrect height on first time rendering.
OnChanged
now can receive the changed value in the callback.- Fix string value incorrect truly check for
ValudateInput
andInfoBox
InfoBox
now will disappear if the callback function returns null as content.- Fix
InfoBox
gives error instead of display nothing when the content is null. - Fix
AboveImage
/BelowImage
gives error instead of display nothing when the SpriteRenderer/Image/RawImage does not have
- IMGUI: Fix PropertyField not with
includeChildren: true
and lead to brokenReferencePicker
ValidateInput
now can receive the value and/or the index (if it's in a list/array) in the callback function.
- Fix
MinMaxSlider
incorrect step. - Fix
ProgressBar
set value is not in real-time in struct type. - UI Toolkit: Fix incorrect image align for
AsssetPreview
,AboveImage
,BelowImage
- UI Toolkit: Fix
LeftToggle
not apply the value.
- UI Toolkit: Fix
MinMaxSlider
incorrect clamp. - UI Toolkit: Fix
MinMaxSlider
difficult to manually input a value because of auto-correction.
- A better parser for
AdvancedDropdown
. Now you can use/
to define a sub item. - UI Toolkit: dropdown icon for
AdvancedDropdown
looks better now. - Fix readme about
FindComponent
ValidateInput
now support validation callback with parameter of the target field value.SaintsEditor
fix a button rendered twice if it's override (or usenew
) in a derived class.SaintsEditor
,ShowInInspector
now will change appearance when value changed for auto property.SaintsEditor
,ShowInInspector
now support to shownull
value with a yellow background.
- Add
NavMeshAreaMask
to select NavMesh area bitmask for Unity's AI Navigation. - Add
NavMeshArea
to select NavMesh area as name, value or bitmask. - Fix a weird issue that
SaintsEditor
might not find the correctMonoScript
in Unity 2021
- Add
GetComponentInParent
/GetComponentInParents
ValidateInput
now also support forbool
result.ValidateInput
now will continuously validate the input rather than check on value changed.- Fix
<label/>
not work in rich text when working with NaughtyAttributes.
Add GetComponentByPath
. Now you can auto sign a component with hierarchy by path, with index filter support.
SaintsEditor
now supports Layout (Foldout, Tab, GropBox, TitledBox etc) to group several fields together- Fix incorrect width condition check for UI Toolkit when trying to fix Unity's labelWidth issue.
- Breaking Changes: rename
UnsaintlyEditor
toSaintsEditor
SatinsEditor
now supportsDOTweenPlay
to preview DOTween without entering play mode- Add
Windows/Saints
menu for quick function toggle - Breaking Changes: rename
InfoBox
'scontentIsCallback
toisCallback
- Breaking Changes: General Buttons rename parameter
buttonLabelIsCallback
toisCallback
- General Buttons now will use function name as label when you omit the
buttonLabel
parameter
- Fix
Addressable
broken on last code refactor - UI Toolkit: Fix
Addressable
picker out of view when the item is long
- IMGUI: Fix
DecoratorDrawer
got drawn more than once because Unity changes the behavior ofPropertyField
in 2022.1+ - IMGUI: Fix
Texture2D
resize for Unity 2021.1
- IMGUI: Fix
Expandable
foldout overlap with label, Issue#1 - IMGUI: Fix
Expandable
may fail when expand a Unity component - IMGUI: Fix
ReadOnly
did not haveEditorGUI.BeginDisabledGroup
andEditorGUI.EndDisabledGroup
in pair
- Fix
Required
not work on nested case. Remove the limitation on int/float - Fix many attributes didn't find correct parent object and failed on some cases
- IMGUI: Fix incorrect height for
InfoBox
- Fix incorrect height when you manually disable UI Toolkit
- IMGUI: Fix
Expandable
not fold/expand correctly on array/list - Fix incorrect texture scale function
- Fix
AssetPreview
won't scale up when give a bigger width/height value - Change
AssetPreview
's parameters:maxWidth
->width
,maxHeight
->height
- UI Toolkit: Fix
AboveImage
/BelowImage
has empty frame space when scale down
Add ReferencePicker
for Unity's SerializeReference
- Fix
Dropdown
has not sub item for/
in UI Toolkit Dropdown
Allow to disable/
as a sub item
- Add
AdvancedDropdown
for UI Toolkit - Fix a issue that when select a value from dropdown, the value is changed internally, but will get actually applied only when you finish inspect current object (like, to inspect another object, close Unity, etc)
- Change the logic of finding resources
- Add
ProgressBar
- Fix
RichLable(null)
not work in IMGUI after the UI Toolkit refactor - Fix
IMGUI
PropertyScope
not disposed issue - Add color
charcoalGray
,oceanicSlate
- Fix scene out of boundary when you remove a scene from build list
- (UI Toolkit) Expandable use
InspectorElement
so it can use a custom editor if you have one - (UI Toolkit) Change all
Toggle
drawer to useRadioButton
component - (UI Toolkit) Fix
CurveRange
won't allow to setm_CurveColor
by script - No longer disable IMGUI functions when UI Toolkit is active, to allow Unity (or your custom inspector) to use UI Toolkit or IMGUI when you have both available.
- When using UI Toolkit mixed with default field with no drawer, now you can add
[UIToolkit]
soSaintsField
will try to align the label width the same way as UI Toolkit does. UnsaintlyEditor
will try to fix the label width issue when using UI Toolkit. If you're usingUnsaintlyEditor
, you do not need the[UIToolkit]
attribute.
UI Toolkit supports are experimental, you can disable it by adding a custom marco SAINTSFIELD_UI_TOOLKIT_DISABLE
Fix UI Toolkit breaks old Unity versions.
- Fix
GameObjectActive
won't save after change active state. - Experimental: support for UI Toolkit (Unity 2022.2+ uses UI Toolkit by default)
- Fix
UnsaintlyEditor
incorrect fields order.
- Add
FindComponent
- Add
ButtonAddOnClick
- Add
UnsaintlyEditor
- No longer need
read/write
enabled when using a picture as icon AboveImage
/BelowImage
now will try to get the image from the field when noname
is given- Change how the scale of
AssetPreview
handled
- Add
CurveRange
- Add
AdvancedDropdown
- Fix
EColor.Green
incorrect color present - Allow
SAINTSFIELD_ADDRESSABLE_DISABLE
macro to disableAddressable
related attributes
- Now we supports Unity
2019.1+
! - Add
AddressableLabel
. This only works if you haveAddressable
installed in your project. - Add
AddressableAddress
. This only works if you haveAddressable
installed in your project. - Add
GetScriptableObject
Expandable
now can be used on anything that is serializable as long as the target can use used bySerializedObject
, no longer limited toScriptableObject
.- Fix
Expandable
background covers the fields on Unity 2019. <color>
label now use the same color as Unity Rich Label plus some extra colors.- Fix
clear
color inRichLabel
actually got white color. - Colors name is now case insensitive in
RichLabel
.
AnimatorParam
no longer offersnull
valueAnimatorParam
andAnimatorState
now will try to find theanimator
on current object if the name ofanimator
is not set- Use standard field picker for
layer
andtag
- Add
LeftToggle
- Fix a issue that when using
Scene
with a string without default value, it would display the first item but the actually value is null or empty string. Now it will sign the first value on it. - Fix a issue that
Scene
will display empty when your scene name starts with an underscore.
- Fix indent for
Expandable
- Add
GetComponentInChildren
- Add
GetComponent
- Add
GetComponentInScene
- Add
GetPrefabWithComponent
- Add
AddComponent
- Fix
AboveImage
andBelowImage
won't scale if the target image is not readable/writeable - Fix
AboveImage
andBelowImage
scale logic - Rename
Range
toPropRange
- Fix a bug that the space below the field is calculated incorrectly
- Allow for list/array field
RichLabel
no longer draw a background- Massive fix for callbacks that did not use the parent container as the target
- Fix image cached logic for
AssetPreview
andAboveImage
/BelowImage
- Fix
Dropdown
when you put it on a field of astruct
- Now you can use
RichLabel
to override child field of an array/list
The core of how Attribute
s are discovered is now changed. This version should be compatible with old ones, but in case I pumped the minor version number to 1
.
- Add
EnumFlags
- Fix a issue that
OnValueChanged
will get called when no change happens at all.
- Add
AboveImage
,BelowImage
- Add
EAlign
forAssetPreview
- Fix scale for
AssetPreview
- Add
Range
- Fix an issue that editor scripts will get build and lead to a build error
- Add
OverlayRichLabel
- Add
PostFieldRichLabel
Add InputAxisAttribute
- Add
RateAttribute
for rating stars. - Fix
ValidateInputAttribute
won't call the validator the first time it renders. - Fix an indent issue