Skip to content

PropertyDrawer

JefferiesTube edited this page Mar 14, 2016 · 2 revisions

Layer Attribute

Can be applied to any integer property/field. Replaces the default integer field editor with a dropdown field of all Layers.

[Layer]
public int LayerTest;

Imgur

SortingLayer Attribute

Can be applied to any integer property/field. Replaces the default integer field editor with a dropdown field of all Sorting Layers.

[SortingLayer]
public int SortingLayerTest;

Imgur

Tag Attribute

Can be applied to any string property/field. Replaces the default text field editor with a dropdown field of all Tags.

[Tag]
public string TagTest;

Imgur

Limit Attribute

Can be applied to any integer property/field. Can be used to set a lower limit and/or upper limit to keep the value within a specific range.

Example 1: Allow only positive values

[Limit(0)]
public int LimitTest;

Example 2: Allow only values between 5 and 12

[Limit(5,12)]
public int LimitTest;
Clone this wiki locally