API reference
API reference
Select your platform
No SDKs available
No versions available

EnumAttribute

EnumAttribute

class EnumAttribute<T : Enum<T>>(keyString: String, key: Int, component: ComponentBase, enumClass: Class<T>, initialValue: T) : TypedAbstractAttribute<T>
An attribute that stores an Enum value.
XML Usage Example:
<component name="Player">
  <EnumAttribute name="playerType" enumType="PlayerType" defaultValue="HUMAN" />
</component>
Enums should be defined like this:
<Enum name="MyEnum">
  <EnumValue value="ENUM_VALUE_1" />
  <EnumValue value="ENUM_VALUE_2" />
</Enum>

Constructors

NameSummary
EnumAttribute
constructor(keyString: String, key: Int, component: ComponentBase, enumClass: Class<T>, initialValue: T)

Properties

NameSummary
value
var value: T

Functions

NameSummary
checkIfComponentIsOld
fun checkIfComponentIsOld()
checkIfComponentIsRecycled
fun checkIfComponentIsRecycled()
get
open override fun get(): Any
getValue
operator fun getValue(thisRef: Any?, property: KProperty<*>): T
keyName
fun keyName(): String
set
open override fun set(value: Any)
setValue
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T)
Did you find this page helpful?
Thumbs up icon
Thumbs down icon