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.

Fields

The interface types that can be assigned to the target UnityEngine.Object field in the inspector
Objects matching the type of this field will be allowed to be assigned to the UnityEngine.Object field in the inspector.

Member Functions

Creates a new Interface attribute.
Parameters
type
The type of interface which is allowed.
types
Extra types of interface which is allowed.
Creates a new Interface attribute.
Parameters
typeFromFieldName
The name of the field that will supply the type constraint used by the interface editor.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon