InterfaceSelectorAttribute Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This attaches a Unity Inspector drawer that will enable selection and instantiation of concrete classes that are assignable to this field. This pairs best with an interface and the [SerializeReference] attribute, though technically any parent class type will work!
[System.AttributeUsage(System.AttributeTargets.Field)]
public class InterfaceSelectorAttribute : UnityEngine.PropertyAttribute
[<System.AttributeUsage(System.AttributeTargets.Field)>]
type InterfaceSelectorAttribute = class
inherit PropertyAttribute
Public Class InterfaceSelectorAttribute
Inherits PropertyAttribute
- Inheritance
-
UnityEngine.PropertyAttributeInterfaceSelectorAttribute
- Attributes
Interface |
This attaches a Unity Inspector drawer that will enable selection and instantiation of concrete classes that are assignable to this field. This pairs best with an interface and the [SerializeReference] attribute, though technically any parent class type will work! |
Allow |
Should the inspector add an option to set this field to null, or is null a bad idea for this field? This does not mean it's impossible for this field to be null if 'false'. |
منتج | الإصدارات |
---|---|
MRTK3 Core Definitions | 3.0, 3.1, 3.2 |