DataObject attributes

DataObjectIcon

Set an icon for this DataObject

  • iconPath: name of icon located in Databrain/Core/Res/Icons or complete asset path: (Assets/MyType/Icons/customIcon.png)

  • iconColor: Color of the icon

[DataObjectIcon("alien", DatabrainColor.Red.GetColor)]
public class EnemyData : DataObject{}

DataObjectTypeName

Set a custom name for this type

  • typeName: the custom name

[DataObjectTypeName("Enemy")]
public class EnemyData : DataObject{}

DataObjectOrder

order this data type by the order index number

  • order: odering index

[DataObjectOrder(0)]
public class EnemyData : DataObject{}

DataObjectMaxObjects

Set max allowed data objects for this data type. Useful for manager types where only one data object would make sense.

  • maxObjects: number of allowed objects

DataObjectHideBaseFields

Hide certain fields from the general foldout. (icon, title, description)

  • hideIconField: if true, hide the icon field

  • hideTitleField: if true, hide the title field

  • hideDescriptionField: if true, hide the description field

DataObjectHideAllFields

Hide all fields, useful when creating a custom GUI and the default data inspector shouldn't display any fields.

DataObjectAddToRuntimeLibrary

Automatically add this DataObject to the runtime DataLibrary at start.

pageAdd data objects at runtime

DataObjectIMGUIInspector

Force the inspector to draw fields with IMGUI. This is just to maintain downward compatibility for certain property drawers.

DataObjectLock

Lock data object creation for this type

HideDataObjectType

Hide this data type in the list view.

Last updated