Class CreateElementOnAddAttribute
Tag a collection field or a property to try to create an instance when adding a new element to the collection.
Namespace: Unity.Properties.UI
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class CreateElementOnAddAttribute : Attribute, _Attribute
Constructors
CreateElementOnAddAttribute()
Constructs a new instance of CreateElementOnAddAttribute.
Declaration
public CreateElementOnAddAttribute()
CreateElementOnAddAttribute(Type)
Constructs a new instance of CreateElementOnAddAttribute with the specified Type.
Declaration
public CreateElementOnAddAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The targeted Type when creating a new instance. |
Properties
Type
Returns the type of the instance that should be instantiated.
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
Type |