Skip to content

GenerateEventCallbackAttribute Class

Mark a field or property to generate an event callback. The target must derive from ScriptableEvent or ScriptableEvent<T>.

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

Inheritance objectAttribute

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; }