/// <summary> /// Adds a HelpBox to the Unity property inspector above this field. /// </summary> /// <param name="text">The help text to be displayed in the HelpBox.</param> /// <param name="type">The icon to be displayed in the HelpBox.</param> public InfoBoxAttribute(string text, InfoBoxMessageType type = InfoBoxMessageType.Info) { this.text = text; #if UNITY_EDITOR this.type = type; #endif }
private MessageType GetMessageType(InfoBoxMessageType helpBoxMessageType) { switch (helpBoxMessageType) { default: case InfoBoxMessageType.None: return(MessageType.None); case InfoBoxMessageType.Info: return(MessageType.Info); case InfoBoxMessageType.Warning: return(MessageType.Warning); case InfoBoxMessageType.Error: return(MessageType.Error); } }