Skip to content

GenerateCollectionCallbackAttribute Class

Mark a field or property to generate a collection callback. The target must derive from ScriptableList<T> or ScriptableDictionary<TKey, TValue>.

C#
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
[ExcludeFromCodeCoverage]
public sealed class GenerateCollectionCallbackAttribute : 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; }