Hide
FieldInfoBox/FieldBelowInfoBox

Draw an info box above/below the field.

Unlike InfoBox, use this on an array/list, the box will be applied to every element (instead of the array/list itself).

  • string content

    The content of the info box.

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

  • EMessageType messageType=EMessageType.Info

    Message icon. Options are

    • None
    • Info
    • Warning
    • Error
  • string show=null

    a callback name or property name for show or hide this info box.

  • bool isCallback=false

    if true, the content will be interpreted as a property/callback function.

    If the value (or returned value) is a string, then the content will be changed

    If the value is (EMessageType messageType, string content) then both content and message type will be changed

  • bool below=false

    Draw the info box below the field instead of above

  • string groupBy="" See GroupBy section

  • AllowMultiple: Yes

BelowInfoBox is a shortcut for [InfoBox(..., below: true)]

using SaintsField; [field: SerializeField] private bool _show; [Space] [FieldInfoBox("Hi\nwrap long line content content content content content content content content content content content content content content content content content content content content content content content content content", EMessageType.None)] [FieldBelowInfoBox("
quot;
+ nameof(DynamicMessage), EMessageType.Warning)] [FieldBelowInfoBox("
quot;
+ nameof(DynamicMessageWithIcon))] [FieldBelowInfoBox("Hi\n toggle content ", EMessageType.Info, nameof(_show))] public bool _content; private (EMessageType, string) DynamicMessageWithIcon => _content ? (EMessageType.Error, "False!") : (EMessageType.None, "True!"); private string DynamicMessage() => _content ? "False" : "True";