Multi Line Property Attribute特性:用于任何字符串屬性。使用此選項(xiàng)允許用戶在多行文本框中編輯字符串。
using Sirenix.OdinInspector;
using UnityEngine;
public class MultiLinePropertyAttributeExample : MonoBehaviour
{
[Multiline(10)]
public string UnityMultilineField = "";
[Title("多行文本字段", bold: false)]
[HideLabel]
[MultiLineProperty(10)]
public string WideMultilineTextField = "";
[InfoBox("Odin支持屬性,但是Unity自己的多行屬性只適用于字段")]
[ShowInInspector]
[MultiLineProperty(10)]
public string OdinMultilineProperty { get; set; }
}