Field attributes

DataObjectDropdown

Enables a useful dropdown field with additional features such as unassign, create new and find DataObject. When using this attribute outside of a DataObject - like in a MonoBehaviour, it is necessary to add a reference to the DataLibrary object and pass the name of the DataLibrary field.

  • dataLibraryFieldName: the name of the data library field

  • includeSubtypes: if true, dropdown also shows derived types

  • tooltip: set an additional etooltip

ExposeToInspector

Use the ExposeToInspector attribute to mark fields which should be displayed in the popup inspector on the DataObjectDropdown property drawer.

DatabrainSerialize

Mark fields which should be serialized by Databrain to a file with the [DatabrainSerialize] attribute. Only fields of DataObjects which are in the runtime-DataLibrary will be serialized.

Border

Set a border around a field

  • borderWidth: The width of the border

  • color: The color of the border

HorizontalLine

Create a horizontal line with custom width and color

  • height: height of the line

  • color: color of the line (DatabrainColor)

Create a dropdown selection

Foldout

Group fields by foldouts (only works in the Databrain editor)

InfoBox

Shows an info box.

  • infoBoxtype: The type of the infoBox (InfoBoxType.Normal / InfoBoxType.Warning / InfoBoxType.Error

  • text: The text message

EnumFlags

Shows an enum selection toggle group for choosing multiple enums.

Hide

Hides a field

Layer

Shows a layer dropdown.

Slider

Create a slider with min and max value

Scene

Create a scene dropdown field

ShowAssetPreview

Creates a preview window of assigned game object

  • width

  • height

Tag

Creates a tag dropdown field.

Textfield

Creates a multiline textfield

Title

Adds a title to the field with an optional border.

  • title

  • borderColor

  • textColor

Last updated