Releases: TylerTemp/SaintsField
3.4.11 SaintsRow with Managed Reference Support
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.
using SaintsField;
public interface IRefInterface
{
public int TheInt { get; }
}
[Serializable]
public struct StructImpl : IRefInterface
{
[field: SerializeField]
public int TheInt { get; set; }
[LayoutStart("Hi", ELayout.FoldoutBox)]
public string myStruct;
public ClassDirect nestedClass;
}
[SerializeReference, ReferencePicker, SaintsRow]
public IRefInterface saints;
[SerializeReference, ReferencePicker(hideLabel: true), SaintsRow(inline: true)]
public IRefInterface inline;
Full Changelog: 3.4.10...3.4.11
P.S.
3.4.10 MinMaxSlider Bug Fix
Fix a bug that low/high input in MinMaxSlider
with free: false
won't work and get reset to min/max value, #94
Full Changelog: 3.4.9...3.4.10
P.S.
3.4.9 Dropdown with Unique Items
- 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
.
[Serializable]
public enum MyEnum
{
[RichLabel("1")]
First,
[RichLabel("2")]
Second,
[RichLabel("3")]
Third,
[RichLabel("4/0")]
ForthZero,
[RichLabel("4/1")]
ForthOne,
}
[Dropdown(EUnique.Disable)] public MyEnum[] myEnumDropdownDisable;
[Dropdown(EUnique.Remove)] public MyEnum[] myEnumDropdownRemove;
[AdvancedDropdown(EUnique.Disable)] public MyEnum[] myEnumAdvancedDropdownDisable;
[AdvancedDropdown(EUnique.Remove)] public MyEnum[] myEnumAdvancedDropdownRemove;
P.S. W.I.P
Full Changelog: 3.4.8...3.4.9
3.4.8 `enum` support for dropdown/EnumFlags with custom labels
- 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.
[Serializable]
public enum MyEnum
{
[RichLabel("1")] // RichLabel is optional. Just for you to have more fancy control
First,
[RichLabel("2")]
Second,
[RichLabel("3")]
Third,
[RichLabel("4/0")]
ForthZero,
[RichLabel("4/1")]
ForthOne,
}
[Dropdown] public MyEnum myEnumDropdown;
[AdvancedDropdown] public MyEnum myEnumAdvancedDropdown;
[Serializable, Flags]
public enum BitMask
{
None = 0,
[RichLabel("M<color=red>1</color>")]
Mask1 = 1,
[RichLabel("M<color=green>2</color>")]
Mask2 = 1 << 1,
[RichLabel("M<color=blue>3</color>")]
Mask3 = 1 << 2,
[RichLabel("M4")]
Mask4 = 1 << 3,
Mask5 = 1 << 4,
}
[EnumFlags]
public BitMask myMask;
Full Changelog: 3.4.7...3.4.8
P.S. Also W.I.P:
3.4.7 Bug Fix
- 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
The document about GetByXPath
has been added to README. Please take a look!
License Notice
Since this version, the 20 icons used in this project have been re-painted. Before this, some icons are from Material UI Icons, which I forgot to mention... (which is licensed under Apache License Version 2.0). And some I do not quite sure about the source...
If the license matters to you, please upgrade to this version! Since this version, everything of this project is now fully licensed under MIT LICENSE
Full Changelog: 3.4.5...3.4.7
P.S. Since this version, I've finally finished the milestone This Is a Long Drive for Someone with Nothing to Think About. It's not been easy honestly. I can not believe that I finished component GetByXPath
, it's way too complex than I expected.
Thanks for your support! Hope I can finish this paint soon
3.4.5 `MinMaxSlider` with manually input
3.4.5
UI Toolkit: fix MinMaxSlider
with free
can display wrong slider when manually input.
3.4.4
Allow free input value in MinMaxSlider
if you manually input int the field, #48
3.4.3
UI Toolkit: Fix Get*
attributes won't save the value
[MinMaxSlider(0, 10, free: true)] public Vector2 freeInput;
free-min-max.mp4
Full Changelog: 3.4.2...3.4.5
Sam Porter Bridges blesses this release with no bugs or whatsoever Oops, speak too fast... Sam, please bless this patched release having no bugs 😅
3.4.2 Bug fix
3.4.2
- Fix
GetComponentInScene
won't search a disabled object - Fix auto-getter attributes support for
SaintsInterface
- IMGUI: fix
OnValueChanged
did not work #90
3.4.1
- UIToolkit: Fix
ShowInInspector
won't disable the updated value - Fix
LayoutEnd
will make the following fields visible likeShowInInspector
- Add
DOTweenStart
as an alias ofDOTweenGroup
Full Changelog: 3.4.0...3.4.2
3.4.0 Refactor for GetComponent & Related Attributes
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.
Full Changelog: 3.3.8...3.4.0
3.3.8 `ArraySize` with range supports
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
[ArraySize(1, 3), ListDrawerSettings] public int[] oneToThreeWithSettings;
Full Changelog: 3.3.7...3.3.8
3.3.7 Experimental Features Added
-
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.
Full Changelog: 3.3.6...3.3.7