Version 3.3.1.2

Odin has a dedicated attribute overview with examples

MultiLinePropertyAttribute class

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector.Attributes
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public sealed class MultiLinePropertyAttribute : Attribute, _Attribute

MultiLineProperty is used on any string property.

Use this to allow users to edit strings in a multi line textbox.

Inheritance
  • System.Object
  • System.Attribute
  • MultiLinePropertyAttribute
Remarks

MultiLineProperty is similar to Unity's UnityEngine.MultilineAttribute but can be applied to both fields and properties.

Example

The following example shows how MultiLineProperty is applied to properties.

public class MyComponent : MonoBehaviour
{
	[MultiLineProperty]
	public string MyString;

	[ShowInInspector, MultiLineProperty(10)]
	public string PropertyString;
}

Constructors

MultiLinePropertyAttribute(Int32)
Makes a multiline textbox for editing strings.
public MultiLinePropertyAttribute(int lines = 3)
Parameters
System.Int32 lines

The number of lines for the text box.

Fields

Lines
The number of lines for the text box.
public int Lines