Releases: TylerTemp/SaintsField
3.36.3 ShowInInspector Polymorphism Class, Struct & Interface
- 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 - Remove the SAINTSFIELD_JETBRAINS_RIDER define by @Insprill in #172
public class GeneralDummyClass: IDummy
{
public string GetComment()
{
return "DummyClass";
}
public int MyInt { get; set; }
public int GenDumInt;
public string GenDumString;
}
[ShowInInspector] private static IDummy _dummy;
[Button]
private void DebugDummy() => Debug.Log(_dummy);
c-showininspector-interface.mp4
Full Changelog: 3.36.2...3.36.3
3.36.2 ShowInInspector Edit Array/List
UI Toolkit: ShowInInspector
can now edit list/array type
using SaintsField;
private class MyClass
{
public string MyString;
public GameObject MyObj;
private MyEnum _myEnum;
}
[ShowInInspector] private Color[] _colors = {Color.red, Color.green, Color.blue};
[ShowInInspector, Ordered] private Color[] _colorEmptyArray;
[Button, Ordered]
private void ArrayChange0ToRed()
{
_colorEmptyArray[0] = Color.red;
}
[ShowInInspector, Ordered] private MyClass[] _myClasses;
c-showininspector-list.mp4
Full Changelog: 3.36.1...3.36.2
3.36.1 ShowInInspector Editing General Class
- UI Toolkit:
ShowInInspector
can now edit a general class type #170 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
// Please ensure you already have SaintsEditor enabled in your project before trying this example
using SaintsField.Playa;
private class MyClass
{
public string MyString;
}
[ShowInInspector] private MyClass _myClass;
[ShowInInspector] private MyClass _myClassD = new MyClass
{
MyString = "Hi",
};
c-showininspector-null.mp4
Full Changelog: 3.36.0...3.36.1
3.36.0 ShowInInspector Editing
Change Log
- 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
New Contributors
Full Changelog: 3.35.1...3.36.0
3.35.1 Auto Getter Bug Fix
Fix auto getters won't apply changes in some cases #161
Full Changelog: 3.35.0...3.35.1
3.35.0 Sub-Field for Rich Label & Show/Hide...-If
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.
using SaintsField;
[GetComponentInChildren, Expandable] public ToggleSub toggle;
// Show if toggle.requireADescription is a truly value
[ShowIf(nameof(toggle) + ".requireADescription")]
public string description;
// ToggleSub.cs
public class ToggleSub : MonoBehaviour
{
[LeftToggle] public bool requireADescription;
}
showsubfield.mp4
using SaintsField;
public class SubField : MonoBehaviour
{
[SerializeField] private string _subLabel;
public double doubleVal;
}
[Separator("Field")]
// read field value
[RichLabel("<color=lime><field/>")] public string fieldLabel;
// read the `_subLabel` field/function from the field
[RichLabel("<field._subLabel/>"), GetComponentInChildren, Expandable] public SubField subField;
// again read the property
[RichLabel("<color=lime><field.gameObject.name/>")] public SubField subFieldName;
[Separator("Field Null")]
// not found target will be rendered as empty string
[RichLabel("<field._subLabel/>")] public SubField notFoundField;
[RichLabel("<field._noSuch/>"), GetComponentInChildren] public SubField notFoundField2;
[Separator("Formatter")]
// format as percent
[RichLabel("<field=P2/>"), PropRange(0f, 1f)] public float percent;
// format `doubleVal` field as exponential
[RichLabel("<field.doubleVal=E/>")] public SubField subFieldCurrency;
c_fieldtag.mp4
Full Changelog: 3.34.0...3.35.0
3.34.0 SpineAttachmentPicker & DefaultExpand
-
Add
SpineAttachmentPicker
to pick anattachment
from Spine. -
Fix Spine related attributes give an 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 terminate 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 prevent them from being included in the group accidentally. -
Add
DefaultExpand
andArrayDefaultExpand
-
Remove
defaultExpanded
fromTable
, useArrayDefaultExpand
instead
Full Changelog: 3.33.3...3.34.0
3.33.3 Table Bug Fix & Improvement
- 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
Full Changelog: 3.33.2...3.33.3
3.33.2 EnumFlags Re-fine
- Change the layout of
EnumFlags
so it can handle a large enum without displaying a super long list - Breaking Changes:
AutoExpanded
is removed fromEnumFlags
c_enum_flags.mp4
Full Changelog: 3.33.1...3.33.2
3.33.1 Bug Fix & Improvement for SaintsDictionary
- Add constructors for
SaintsDictionary<,>
so it can be created exactly like a standard c-sharpDictionary<,>
- If the key/value for
SaintsDictionary<,>
is a general class/struct already with a custom drawer, use that drawer rather than flat it. - Fix
SaintsDictionary<,>
can not detect the serialized field when inherited
Full Changelog: 3.33.0...3.33.1