API reference

ObjectTypeAttribute Class

Extends PropertyAttribute
An attribute for restricting object gui fields to one or more specified target types. This allows for serialized interfaces and abstract class references that work on MonoBehaviours or SerializedAssets.

Constructors

ObjectTypeAttribute ( targetType , additionalTargetTypes )
Constructor that takes in the target type that any objects must be cast to
Signature
Meta.WitAi.Attributes.ObjectTypeAttribute.ObjectTypeAttribute(Type targetType, params Type[] additionalTargetTypes)
Parameters
targetType: Type
additionalTargetTypes: params Type []
ObjectTypeAttribute ( requireAll , targetType , additionalTargetTypes )
Constructor that takes in the target type that any objects must be cast to
Signature
Meta.WitAi.Attributes.ObjectTypeAttribute.ObjectTypeAttribute(bool requireAll, Type targetType, params Type[] additionalTargetTypes)
Parameters
requireAll: bool
targetType: Type
additionalTargetTypes: params Type []

Properties

RequiresAllTypes : bool
[Get]
If true, all types must be included. If false, any of the specified types can be included
Signature
bool Meta.WitAi.Attributes.ObjectTypeAttribute.RequiresAllTypes
TargetTypes : Type []
[Get]
The types this property will be restricted to
Signature
Type [] Meta.WitAi.Attributes.ObjectTypeAttribute.TargetTypes