API reference
API reference
Select your platform
No SDKs available
No versions available

InterfaceAttribute Class

Extends PropertyAttribute
When this attribute is attached to a UnityEngine.Object field within a MonoBehaviour, this allows an interface to be specified in to to entire only a specific type of object can be attached.

Constructors

InterfaceAttribute ( type , types )
Creates a new Interface attribute.
Signature
Oculus.Interaction.InterfaceAttribute.InterfaceAttribute(Type type, params Type[] types)
Parameters
type: Type  The type of interface which is allowed.
types: params Type []  Extra types of interface which is allowed.
InterfaceAttribute ( typeFromFieldName )
Creates a new Interface attribute.
Signature
Oculus.Interaction.InterfaceAttribute.InterfaceAttribute(string typeFromFieldName)
Parameters
typeFromFieldName: string  The name of the field that will supply the type constraint used by the interface editor.

Fields

TypeFromFieldName : string
Objects matching the type of this field will be allowed to be assigned to the UnityEngine.Object field in the inspector.
Signature
string Oculus.Interaction.InterfaceAttribute.TypeFromFieldName
Types : Type []
The interface types that can be assigned to the target UnityEngine.Object field in the inspector
Signature
Type [] Oculus.Interaction.InterfaceAttribute.Types