DataObject Property Drawer

The DataObject dropdown property drawer is a very powerful UI element which draws your DataObjects fields and custom editor inside of your custom classes. To make use of the property drawer simply add the DataObjectDropdown attribute to your DataObject field. A required string must be provided to the attribute which is the name of the DataLibrary reference field. See following example:

// All Databrain attributes are in this namespace
using Databrain.Attributes;

// Data Library reference
public DataLibrary data;

[DataObjectDropdown(nameof(data))]
public DataObject myDataObject;

The property drawer can display custom editors like the Logic - node editor, default fields and also custom Odin Inspector editors. (Since version 1.3)

Using the Runtime switch, switches from initial to the runtime data object. (If there's any runtime DataObject available)

Interface

  1. Add DataObjectDropdown attribute to a DataObject field and provide the name of the DataLibrary field.

  2. Select and assign the DataObject from the dropdown.

  3. Un-assign the DataObject reference.

  4. Create a new DataObject.

  5. Inspector popup. Show DataObject fields which have the ExposeToInspector-attribute. You can modify those values directly from the Unity inspector.

  6. View selected DataObject in the Databrain editor. (opens Databrain editor)

  7. ExposeToInspector popup view. (Shows only fields which are marked with the ExposeToInspector attribute)

Last updated