Api Sandbox AnyOfType<T>
struct

AnyOfType<T>

public sealed struct AnyOfType<T>

A wrapper that holds an instance of any concrete type assignable to . Use this as a property type when you want the inspector to let you pick from all non-abstract implementations of an abstract class or interface. public AnyOfType&lt;Scatterer&gt; MyScatterer { get; set; } Serialization stores the concrete type name alongside the property values

Constructors

AnyOfType<T>(T value)

Properties

Name Type Description
Value T The concrete instance, or null if no type is selected.
HasValue Boolean Returns true if Value is not null.
Assembly: Sandbox.System Namespace: Sandbox Full Name: Sandbox.AnyOfType<T>