Table of Contents

Interface IComponentRegistry

Namespace
KeenEyes.Capabilities
Assembly
KeenEyes.Core.dll

Abstraction over the component registry for AOT-compatible component registration.

public interface IComponentRegistry

Remarks

This interface allows snapshot and serialization code to work with component registries without depending on the concrete ComponentRegistry type.

Properties

All

Gets all registered component types.

IReadOnlyList<ComponentInfo> All { get; }

Property Value

IReadOnlyList<ComponentInfo>

Count

Gets the number of registered component types.

int Count { get; }

Property Value

int

Methods

Get(Type)

Gets component info for a type.

ComponentInfo? Get(Type type)

Parameters

type Type

The component type.

Returns

ComponentInfo

The component info, or null if not registered.

Register<T>(bool)

Registers a component type.

ComponentInfo Register<T>(bool isTag = false) where T : struct, IComponent

Parameters

isTag bool

Whether the component is a tag component.

Returns

ComponentInfo

The component info.

Type Parameters

T

The component type.