AnyOfType<T>class

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 MyScatterer { get; set; } Serialization stores the concrete type name alongside the property values

object→AnyOfType<T>
Namespace
Sandbox
Assembly
Sandbox.System
Declaration
public sealed struct Sandbox.AnyOfType<T>

Constructors1

Showing 1 constructors

public AnyOfType<T>(T value)PUBLICCONSTRUCTOR

ParameterTypeDescription
valueT—

Properties2

Showing 2 properties

public bool Sandbox.AnyOfType<T>.HasValue { get; set; }PUBLICGETSET

Returns true if `Sandbox.AnyOfType.Value` is not null.

Returns:bool—

public T Sandbox.AnyOfType<T>.Value { get; set; }PUBLICGETSET

The concrete instance, or null if no type is selected.

Returns:T—

On this page