MetaChange
This event is called when a meta data from a entity changes.
| Parameter | Description |
|---|---|
| entity | The entity that contains the meta data |
| key | The key of the data |
| value | The value of the data |
Normal event handler
Alt.OnMetaDataChange += (entity, key, value) => {
// ...
}
Attribute event handler
Warning
Attribute event handlers only work in Scripts, or after executing Alt.RegisterEvents on a class instance.
For more info see: Create script
public class MyScript : IScript
{
[ScriptEvent(ScriptEventType.MetaDataChange)]
public bool OnMetaDataChange(IEntity entity, string key, object value)
{
// ...
}
}