-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawInlineAttribute.cs
30 lines (25 loc) · 1.03 KB
/
DrawInlineAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using UnityEngine;
namespace ZeroVector.Common.ISO {
/// <summary>
/// This attribute allows you to draw any scriptable object as inlined and/or to customise the appearance of an
/// inlined scriptable object.
/// </summary>
public class DrawInlineAttribute : PropertyAttribute {
/// <summary>
/// Whether to display a label with the name of the object.
/// </summary>
public readonly bool showName = true;
/// <summary>
/// If set and not empty, will override the inlined object's label with the given string.
/// </summary>
public readonly string nameOverride = null;
/// <summary>
/// Allows you to draw any scriptable object as inlined, or to customise the appearance of
/// an inlined scriptable object.
/// </summary>
public DrawInlineAttribute(bool showName = true, string nameOverride = "") {
this.showName = showName;
this.nameOverride = nameOverride;
}
}
}