Tri-Inspector/Runtime/Attributes/InfoBoxAttribute.cs

21 lines
651 B
C#
Raw Normal View History

2022-05-18 14:29:26 -04:00
using System;
using System.Diagnostics;
namespace TriInspector
{
2022-05-19 10:49:19 -04:00
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
2022-05-18 14:29:26 -04:00
[Conditional("UNITY_EDITOR")]
public class InfoBoxAttribute : Attribute
{
public string Text { get; }
public TriMessageType MessageType { get; }
2022-05-19 10:31:43 -04:00
public string VisibleIf { get; }
2022-05-18 14:29:26 -04:00
2022-05-19 10:31:43 -04:00
public InfoBoxAttribute(string text, TriMessageType messageType = TriMessageType.Info, string visibleIf = null)
2022-05-18 14:29:26 -04:00
{
Text = text;
MessageType = messageType;
2022-05-19 10:31:43 -04:00
VisibleIf = visibleIf;
2022-05-18 14:29:26 -04:00
}
}
}