Label Text Attribute:用于更改屬性的標簽。如果您想要的標簽與屬性名稱不同,請使用此標簽。
同樣可以通過$特殊符指定某個屬性的值作為實參,也已經通過@直接書寫表達式
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LabelTextAttributeExample : MonoBehaviour
{
[LabelText("1")]
public int MyInt1;
[LabelText("2")]
public int MyInt2;
[LabelText("3")]
public int MyInt3;
[InfoBox("Use $ to refer to a member string.")]
[LabelText("$LabelText")]
public string LabelText = "Dynamic label text";
[InfoBox("Use @ to execute an expression.")]
[LabelText("@DateTime.Now.ToString(\"HH:mm:ss\")")]
public string DateTimeLabel;
}