InterfaceSelectorAttribute(Boolean) Constructor
Definition
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!
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'.