Notes
The '[TppShowAsLabel…]' attributes allow you to display a property. This can be useful in many ways. Here’s an example from TilePlusBase.cs that shows how the Tag property as shown in the Brush Inspector works.
/// <summary>
/// Property to get the optional tag
/// </summary>
/// <value>The tag.</value>
[TptShowAsLabelBrushInspector(true)]
public string Tag
{
get => string.IsNullOrEmpty(m_Tag)
? string.Empty
: m_Tag.Trim();
set
{
#if UNITY_EDITOR
if (!TpLib.IsPlayMode)
#endif
m_Tag = value.Trim();
}
It’s not a great idea to do anything too complex since there’s repeated access during an Editor session when the Selection Inspector or TilePlus Utility window are in use.