YaCustomPropertyAPI
Creates
CustomPropertyAccessor instances for custom property management.Functions
table YaCustomPropertyAPI.GetLuaObject(string key)
ReturnsThe lua object associated with the key or nil if not exists.
Returns a lua object associated with the key.local o = YaCustomPropertyAPI.GetLuaObject("some-key")
keyThe key.
void YaCustomPropertyAPI.SetLuaObject(string key, table value)
Saves a lua object associated with a key.
local o = { name = "John", age = 30 }
YaCustomPropertyAPI.SetLuaObject("some-key", o)
keyThe key.valueThe lua object.
CustomPropertyAccessor YaCustomPropertyAPI.GetCustomPropertyAccessor(YaEntity entity)
Returnsthe CustomPropertyAccessor for the entity.
Gets a CustomPropertyAccessor for the entity.entityThe entity to getCustomPropertyAccessor
boolean YaCustomPropertyAPI.HasCustomPropertyAccessor(YaEntity entity)
Returnstrue if the entity has CustomPropertyAccessor
Checks whether the entity has CustomPropertyAccessor.entityThe entity to check
CustomPropertyAccessor YaCustomPropertyAPI.AddOrGetCustomPropertyAccessor(YaEntity entity)
Returnsthe CustomPropertyAccessor for the entity
Add CustomPropertyAccessor to the entity.entityThe entity to add or getCustomPropertyAccessor