Skip to content

Releases: TylerTemp/SaintsField

3.4.11 SaintsRow with Managed Reference Support

11 Nov 13:18
Compare
Choose a tag to compare
  1. SaintsRow now support managed reference type. #80
  2. Add Window/Saints/Create or Edit SaintsField Config config tweak so you can change the default behavior of auto getters. #72
  3. 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;

image

Full Changelog: 3.4.10...3.4.11


P.S.

3.4.10 MinMaxSlider Bug Fix

08 Nov 10:39
Compare
Choose a tag to compare

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

02 Nov 14:08
Compare
Choose a tag to compare
  1. Add EUnique.Remove, EUnique.Disable for Dropdown & AdvancedDropdown. When using on a list/array, a duplicated option can be removed or disabled.
  2. IMGUI: Expandable fix repeatedly creating SerializedObject and lead to un-editable fields. Possibly related to #78
  3. 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;

image

image


P.S. W.I.P

Full Changelog: 3.4.8...3.4.9

3.4.8 `enum` support for dropdown/EnumFlags with custom labels

31 Oct 15:57
Compare
Choose a tag to compare
  1. 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
  2. Using RichLabel on an enum will allow Dropdown/AdvancedDropdown to change the name displayed for each enum item.
    The EnumFlags 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;

image

image

[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;

image

Full Changelog: 3.4.7...3.4.8


P.S. Also W.I.P:

3.4.7 Bug Fix

29 Oct 15:47
Compare
Choose a tag to compare
  1. Fix OnEvent and OnButtonClick wouldn't save the result.
  2. Fix Dropdown and AdvancedDropdown gave error when working with long type, #92
  3. 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

25 Oct 09:24
Compare
Choose a tag to compare

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

16 Oct 14:35
Compare
Choose a tag to compare

3.4.2

  1. Fix GetComponentInScene won't search a disabled object
  2. Fix auto-getter attributes support for SaintsInterface
  3. IMGUI: fix OnValueChanged did not work #90

3.4.1

  1. UIToolkit: Fix ShowInInspector won't disable the updated value
  2. Fix LayoutEnd will make the following fields visible like ShowInInspector
  3. Add DOTweenStart as an alias of DOTweenGroup

Full Changelog: 3.4.0...3.4.2

3.4.0 Refactor for GetComponent & Related Attributes

14 Oct 14:40
Compare
Choose a tag to compare

This upgrade contains Breaking Changes! Though it will not break your code, but some behavior is adjusted. Please read before upgrade.

Bug Fix:

  1. UI Toolkit: Fix FieldType won't update the value if the value is changed externally.
  2. 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: when NoAutoResign is on, by default there will be a reload button when value is mismatched. Turn this on to hide the reload button.
    • NoMessage: when NoAutoResign and NOResignButton 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 pass EXP 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:

  1. As these attributes complain less when missing the target, you may want to add a [Required] together.
  2. 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

06 Oct 12:59
Compare
Choose a tag to compare
  1. ArraySize allow to set range, implements #77
  2. If you have ListDrawerSettings enabled, the Add and Remove buttons will be disabled/enabled accordingly if you also have ArraySize
  3. Improve logic and fix some bugs for ListDrawerSettings for IMGUI
  4. Experimental GetByXPath fix predicates parsing
[ArraySize(1, 3), ListDrawerSettings] public int[] oneToThreeWithSettings;

image

Full Changelog: 3.3.7...3.3.8

3.3.7 Experimental Features Added

05 Oct 10:15
Compare
Choose a tag to compare
  1. Use AdvancedDropdown for ReferencePicker, implement #87

    image

  2. 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