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
Count
Gets the number of registered component types.
int Count { get; }
Property Value
Methods
Get(Type)
Gets component info for a type.
ComponentInfo? Get(Type type)
Parameters
typeTypeThe 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
isTagboolWhether the component is a tag component.
Returns
- ComponentInfo
The component info.
Type Parameters
TThe component type.