TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.TptShowEnumAttribute Class Reference

This attribute can be used in Tile classes to affect what is displayed in the Tile++Brush selection inspector. This is used to show Enums in a pop-up. More...

Inheritance diagram for TilePlus.TptShowEnumAttribute:
Collaboration diagram for TilePlus.TptShowEnumAttribute:

Public Member Functions

 TptShowEnumAttribute (SpaceMode spaceMode=SpaceMode.None, ShowMode showMode=ShowMode.Always, string visibilityProperty="", bool updateTpLib=false, bool isFlagsEnum=false, int[]? badValues=null)
 Show an enum.

Public Attributes

readonly bool m_UpdateTpLib
 Optional, for fields only (incl enums/obj field). Use when TpLib needs to be updated. See the m_Tag field in TilePlusBase for example.
readonly bool m_IsFlagsEnum
 True if this a flags enum.
readonly? int[] m_BadValues
 Not used on FLAG enums. Normal enums: this is an array of integer values which aren't acceptable. It expected that this list will be short, like 1 or 2 items. A long list will impact editor performance a bit.
Public Attributes inherited from TilePlus.TptAttributeBaseAttribute
SpaceMode m_SpaceMode
 Space or draw-line control.
ShowMode m_ShowMode
 Controls how to show the item that the attr is attached to.
string m_VisibilityProperty
 If showMode == Property, the name of a property to control visibility.

Additional Inherited Members

Protected Member Functions inherited from TilePlus.TptAttributeBaseAttribute
 TptAttributeBaseAttribute (SpaceMode spaceMode=SpaceMode.None, ShowMode showMode=ShowMode.Always, string visibilityProperty="")
 Constructor for the Tpt base attribute.

Detailed Description

This attribute can be used in Tile classes to affect what is displayed in the Tile++Brush selection inspector. This is used to show Enums in a pop-up.

Constructor & Destructor Documentation

◆ TptShowEnumAttribute()

TilePlus.TptShowEnumAttribute.TptShowEnumAttribute ( SpaceMode spaceMode = SpaceMode::None,
ShowMode showMode = ShowMode::Always,
string visibilityProperty = "",
bool updateTpLib = false,
bool isFlagsEnum = false,
int ?[] badValues = null )

Show an enum.

Parameters
visibilityPropertyThe name of a property used to control visibility of this field when showMode is Property
updateTpLibOptional, for fields only (incl enums/obj field). Use when TpLib needs to be updated. See the m_Tag field in TilePlusBase for example.
spaceModeSpace before or after this field
showModevisibility control
isFlagsEnumOpitonally indicate that this is a FLAGS enum. (new in 4.1)
badValuesFor non-flag enums, an array of values that are inappropriate for this particular use of the enum.

Member Data Documentation

◆ m_BadValues

readonly? int [] TilePlus.TptShowEnumAttribute.m_BadValues

Not used on FLAG enums. Normal enums: this is an array of integer values which aren't acceptable. It expected that this list will be short, like 1 or 2 items. A long list will impact editor performance a bit.

◆ m_IsFlagsEnum

readonly bool TilePlus.TptShowEnumAttribute.m_IsFlagsEnum

True if this a flags enum.

◆ m_UpdateTpLib

readonly bool TilePlus.TptShowEnumAttribute.m_UpdateTpLib

Optional, for fields only (incl enums/obj field). Use when TpLib needs to be updated. See the m_Tag field in TilePlusBase for example.


The documentation for this class was generated from the following file: