Hide
FieldSeparator / FieldBelowSeparator
Tip
Only use this if you can not enable SaintsEditor

Draw text, separator, spaces for field on above / below with rich text & dynamic text support. Using on an array will apply to every element (instead of the array/list itself).

Parameters:

  • string title=null display a title. null for no title, only separator.

    If it starts with $, the leading $ will be removed and isCallback will be set to true. Use \$ to escape the starting $.

  • EColor color=EColor.Gray color for the title and the separator

  • EAlign eAlign=EAlign.Start how the title is positioned, options are:

    • EAlign.Start
    • EAlign.Center
    • EAlign.End
  • bool isCallback=false when true, use title as a callback to get a dynamic title

  • int space=0 leave some space above or below the separator, like what Space does.

  • bool below=false when true, draw the separator below the field.

using SaintsField; [Space(50)] [FieldSeparator("Start")] [FieldSeparator("Center", EAlign.Center)] [FieldSeparator("End", EAlign.End)] [FieldBelowSeparator("
quot;
+ nameof(Callback))] public string s3; public string Callback() => s3; [Space(50)] [FieldSeparator] public string s1; [FieldSeparator(10)] // this behaves like a space [FieldSeparator("[ Hi <color=LightBlue>Above</color> ]", EColor.Aqua, EAlign.Center)] [FieldBelowSeparator("[ Hi <color=Silver>Below</color> ]", EColor.Brown, EAlign.Center)] [FieldBelowSeparator(10)] public string hi; [FieldBelowSeparator] public string s2;

image

This is very useful when you what to separate parent fields from the inherent:

using SaintsField; public class SeparatorParent : MonoBehaviour { [BelowSeparator("End Of <b><color=Aqua><container.Type/></color></b>", EAlign.Center, space: 10)] public string parent; } public class SeparatorInherent : SeparatorParent { public string inherent; }

image