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.
The interface types that can be assigned to the target UnityEngine.Object field in the inspector
string TypeFromFieldName[Get]
Objects matching the type of this field will be allowed to be assigned to the UnityEngine.Object field in the inspector.
InterfaceAttribute ( Type type,
params Type [] types )
Creates a new Interface attribute.
ParameterstypeThe type of interface which is allowed.
typesExtra types of interface which is allowed.
InterfaceAttribute ( string typeFromFieldName )
Creates a new Interface attribute.
ParameterstypeFromFieldNameThe name of the field that will supply the type constraint used by the interface editor.