Skip to content

Releases: TylerTemp/SaintsField

3.15.1 Auto Runner & IMGUI Improvement

09 Jan 09:38
Compare
Choose a tag to compare
  1. Better Auto Runner serialization and drawer
  2. IMGUI: Fix auto getters might fail when refreshing the resources
  3. IMGUI: All kind of buttons now support IEnumerator return type (same as UI Toolkit)
  4. IMGUI: Auto Runner is now supported in IMGUI
  5. IMGUI: Layout with border or foldout, can now indent a bit for array and generic type, to increase the readability
  6. IMGUI: Layout foldout icon is now in gray color instead of white

(This is IMGUI; UI Toolkit already has this feature long ago)

{D034B605-7DE5-4FDA-B9FB-0C059F992533}

Full Changelog: 3.15.0...3.15.1

3.15.0 AddressableResource & Auto Runner

08 Jan 16:07
Compare
Choose a tag to compare
  1. UI Toolkit: Add AddressableResource for AssetReference inline editing
  2. Using Required on addressable's AssetReference will check if the target asset is valid
  3. UI Toolkit: AutoRunner now can specify if you want to skip the hidden fields (hidden by ShowIf, HideIf. Not work for LayoutShowIf, LayoutHideIf)
Unity_SDmMsTNW2a.mp4

Full Changelog: 3.14.1...3.15.0

Note: I know recent updates did not give an implementation for IMGUI. This is because I added features I needed for my project first. I'll add IMGUI support for these features as soon as possible.

3.14.1 Validation Tool

05 Jan 14:30
Compare
Choose a tag to compare
  1. 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:

    1. When working with ListDrawerSettings, search function will not trigger the auto getters re-running.
    2. 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)
    3. Better performance, especially for IMGUI.
  2. UI Toolkit: A simple validation tool under Window - Saints - Auto Runner, related to #115

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

  3. 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);
Unity_mwFkGmDavX.mp4

Full Changelog: 3.13.1...3.14.1

3.13.1 Bug Fix

02 Jan 14:28
Compare
Choose a tag to compare
  1. UI Toolkit: Fix SaintsEditor created many unused empty VisualElement
  2. UI Toolkit: Fix rich label style might be null when falling back to IMGUI drawer
  3. UI Toolkit: Fix SaintsEditorWindow can not vertically scroll when the window is very high

Full Changelog: 3.13.0...3.13.1

3.13.0 Folder Picker

31 Dec 12:58
Compare
Choose a tag to compare
  1. Add AssetFolder to pick a folder under Assets folder.
  2. Add ResourceFolder to pick a folder under Unity's Resources folders
using SaintsField;

[ResourceFolder] public string resourcesFolder;
[ResourceFolder] public string[] resourcesFolders;
Unity_Lcv3BKJy4w.mp4

Full Changelog: 3.12.1...3.13.0

3.12.1 Bug Fix

30 Dec 12:49
Compare
Choose a tag to compare
  1. Fix RequireType didn't give a correct component when using with interface, #114
  2. Fix ShowInInspector sometimes can not draw a correct value when a nested field is null

Full Changelog: 3.12.0...3.12.1

3.12.0 SaintsEditorWindow

26 Dec 14:38
Compare
Choose a tag to compare
  1. Add SaintsEditorWindow to easily make an EditorWindow.
  2. IMGUI: Fix OnValueChanged didn't work with Dropdown and AdvancedDropdown
ExamplePanel.mp4
Unity_aTUNRhhBig.mp4

Full Changelog: 3.11.0...3.12.0

3.11.0 FlagsDropdown & RuntimeAnimatorController

20 Dec 14:50
Compare
Choose a tag to compare
  1. Add FlagsDropdown to toggle flags with search support, #96
  2. AnimatorState now supports RuntimeAnimatorController type, #113
  3. IMGUI: Fix EnumFlags does not support rich text
using SaintsField;

[Serializable, Flags]
public enum F
{
    [RichLabel("[Null]")]  // RichLabel is optional
    Zero,
    [RichLabel("Options/Value1")]
    One = 1,
    [RichLabel("Options/Value2")]
    Two = 1 << 1,
    [RichLabel("Options/Value3")]
    Three = 1 << 2,
    Four = 1 << 3,
}

[FlagsDropdown]
public F flags;

image

Full Changelog: 3.10.0...3.11.0

3.10.0 DrawLine & GUIColor

20 Dec 06:07
Compare
Choose a tag to compare
  1. Add DrawLine to draw a line between different objects
  2. Add ArrowHandleCap to draw an arrow between different objects without SaintsDraw installed
  3. Add GUIColor to color a field, #107
// EColor
[GUIColor(EColor.Cyan)] public int intField;
// Hex color
[GUIColor("#FFC0CB")] public string[] stringArray;
// rgb/rgba
[GUIColor(112 / 255f, 181 / 255f, 131 / 255f)]
public GameObject lightGreen;
[GUIColor(0, 136 / 255f, 247 / 255f, 0.3f)]
public Transform transparentBlue;

// Dynamic color of field
[GUIColor("$" + nameof(dynamicColor)), Range(0, 10)] public int rangeField;
public Color dynamicColor;

// Dynamic color of callback
[GUIColor("$" + nameof(DynamicColorFunc)), TextArea] public string textArea;
private Color DynamicColorFunc() => dynamicColor;

// validation
[GUIColor("$" + nameof(ValidateColor))]
public int validate;

private Color ValidateColor()
{
    const float c = 207 / 255f;
    return validate < 5 ? Color.red : new Color(c, c, c);
}
Unity_ZbId8iVAhG.mp4

Full Changelog: 3.9.1...3.10.0

3.9.1 Bug Fix

18 Dec 08:46
Compare
Choose a tag to compare
  1. IMGUI: Fix DrawLabel won't work on array/list
  2. IMGUI: SaintsArrow is now available in IMGUI
  3. Fix ReferencePicker didn't work if the definition is inside a generic class etc. #112

Full Changelog: 3.9.0...3.9.1