Skip to main content

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 PaintMaskTag property as shown in the Brush Inspector works.

The
/// PaintMask<summary>                                            
is/// a list, which would take up a lot of roomProperty to display. Below,get the listoptional istag                     
turned/// into</summary>                                           
a/// <value>The tag.</value>                              
[TptShowAsLabelBrushInspector(true)]                     
public string forTag                                        
display.

{ 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.