Skip to content

GenerateEventCallbackAttribute Class

Mark a field or property to generate an event callback. The target must derive from ScriptableEvent or Hertzole.ScriptableValues.ScriptableEvent1.

C#
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
[ExcludeFromCodeCoverage]
public sealed class GenerateEventCallbackAttribute : Attribute

Inheritance object → Attribute

The containing type must be marked with GenerateScriptableCallbacksAttribute in order to generate any callbacks.

Can be used to set a custom name for the generated callback method. If not set, the default naming convention will be used.

C#
public string CallbackName { get; set; }