Enfusion Script API
Loading...
Searching...
No Matches
Attribute Interface Reference

Public Member Functions

void Attribute (string defvalue="", string uiwidget="auto", string desc="", string params="", ParamEnumArray enums=NULL, string category="", int precision=3, TypeName enumType=void, bool prefabbed=false)
 

Public Attributes

string m_DefValue
 
string m_UiWidget
 use values from UIWidgets
 
string m_Params
 Parameters that specify how the attribute behaves in editor, depends on property type and used UI widget (see detailed description of individual UIWidgets).
 
string m_Desc
 
string m_Category
 
int m_Precision
 
ref ParamEnumArray m_Enums
 Only ints and floats are currently supported.
 
TypeName m_EnumType
 
bool m_Prefabbed
 

Constructor & Destructor Documentation

◆ Attribute()

void Attribute.Attribute ( string defvalue = "",
string uiwidget = "auto",
string desc = "",
string params = "",
ParamEnumArray enums = NULL,
string category = "",
int precision = 3,
TypeName enumType = void,
bool prefabbed = false )

Member Data Documentation

◆ m_Category

string Attribute.m_Category

◆ m_DefValue

string Attribute.m_DefValue

◆ m_Desc

string Attribute.m_Desc

◆ m_Enums

ref ParamEnumArray Attribute.m_Enums

Only ints and floats are currently supported.

Array can be defined this way:

{ ParamEnum("Choice 1", "1"), ParamEnum("Choicen 2", "2") }
Definition attributes.c:3

◆ m_EnumType

TypeName Attribute.m_EnumType

◆ m_Params

string Attribute.m_Params

Parameters that specify how the attribute behaves in editor, depends on property type and used UI widget (see detailed description of individual UIWidgets).

  • for numeric types use format: "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5", for min/max values can be used also inf / -inf as infinite
  • for vector type that holds coordinates you can use "inf inf 0 purpose=coords space=entity anglesVar=anglesVariableName" where anglesVar parameter is only optional (sets gizmo rotation). Width these parameters the editor provides editing in scene though axis gizmo
  • for vector type that holds euler angles you can use "inf inf 0 purpose=angles space=entity coordsVar=coordsVariableName" where coordsVar parameter is only optional (sets gizmo position). Width these parameters the editor provides editing in scene though rotation gizmo
  • for vector type that holds normalized direction you can use "inf inf 0 purpose=direction space=entity". Width these parameters the editor provides editing in scene using rotation gizmo
  • for vector type you can choose between parameter space=entity and space=world depending on which space the value is used for (entity/model space or world space)
  • for example for file dialog (UIWidgets.ResourceNamePicker widget) use format "ext1 ext2 ext3"

◆ m_Precision

int Attribute.m_Precision

◆ m_Prefabbed

bool Attribute.m_Prefabbed

◆ m_UiWidget

string Attribute.m_UiWidget

use values from UIWidgets


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