Language
Edit

InterfaceSelectorAttribute(Boolean) Constructor

Definition

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!

public InterfaceSelectorAttribute(bool allowNull = false);
new MixedReality.Toolkit.InterfaceSelectorAttribute : bool -> MixedReality.Toolkit.InterfaceSelectorAttribute
Public Sub New (Optional allowNull As Boolean = false)

Parameters

allowNull
Boolean

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'.

Applies to