Skip to main content

Class SystemTypeAttribute

Namespace: RealityCollective.ServiceFramework.Attributes

Base class for class selection constraints that can be applied when selecting a SystemType with the Unity inspector.

public class SystemTypeAttribute : PropertyAttribute

Inheritance

PropertyAttribute ← SystemTypeAttribute

Derived

ExtendsAttribute, ImplementsAttribute

Constructors

SystemTypeAttribute(Type, TypeGrouping)

public SystemTypeAttribute(Type type, TypeGrouping grouping = TypeGrouping.ByNamespaceFlat)

Parameters

type Type

Initializes a new instance of the SystemTypeAttribute class.

grouping TypeGrouping

Gets or sets grouping of selectable classes. Defaults to ByNamespaceFlat unless explicitly specified.

Properties

AllowAbstract

Gets or sets whether abstract classes can be selected from drop-down. Defaults to a value of false unless explicitly specified.

public bool AllowAbstract { get; protected set; }

Property Value

bool

Grouping

Gets or sets grouping of selectable classes. Defaults to ByNamespaceFlat unless explicitly specified.

public TypeGrouping Grouping { get; protected set; }

Property Value

TypeGrouping

Methods

IsConstraintSatisfied(Type)

Determines whether the specified Type satisfies filter constraint.

public virtual bool IsConstraintSatisfied(Type type)

Parameters

type Type

Type to test.

Returns

bool

A Boolean value indicating if the type specified by type satisfies this constraint and should thus be selectable.