Skip to content

MigrateTo5

TylerTemp edited this page Oct 15, 2025 · 1 revision

Migrate From 4 To 5

Breaking Changes

Array/List Element Label

Tip

If you never changed each element's label of array/list, skip this part

RichLabel now works for the array/list's label itself, not element. Use FieldLabelText instead

[FieldLabelText("$" + nameof(ArrayLabels))]  // Change RichLabel to this
public string[] arrayLabels;

private string ArrayLabels(int index) => $"<color=pink>[{(char)('A' + index)}]";

Decorative Items for Array/List Element

Tip

If you never decorate each element of array/list with InfoBox or Above/Below-RichLabel, skip this part

InfoBox, BelowInfoBox, AboveRichLabel, BelowRichLabel no longer works on element of array/list, but array/list itself. Use Field-* version instead.

[FieldInfoBox("$" + ElementText)]
public string[] myLis;

private string ElementText(string e) => $"<color=pink>{e}";

Array/List Element Default Expanded

Tip

If you never set each element of array/list to expand, skip this part

DefaultExpand now expand array/list itself. To expand each element, use FieldDefaultExpand instead.

[Serializable]
public struct MySct {
    public string MyString;
}

[FieldDefaultExpand]  // This expands every element. And [DefaultExpand] will expand the list itself.
public MySct[] MySctList;

Alias

There are some old names which are kept in project you can still use. But it's suggested to use the new name.

Old Name (Alias) New Name
PlayaRichLabel LabelText
RichLabel FieldLabelText
Separator FieldSeparator
PlayaBelowSeparator BelowSeparator
BelowSeparator FieldBelowSeparator
OverlayRichLabel OverlayText