- 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