using System.Reflection; using ExampleWorld.wit.imports.lyra.api; using LyraApi.Ecs; public class Component(string hostName, ulong hostSize, ulong hostAlignment, ulong typeId) { public string HostName { get; } = hostName; public ulong HostSize { get; } = hostSize; public ulong HostAlignment { get; } = hostAlignment; public ulong TypeId { get; } = typeId; public static Component FromComponent() where T : IComponent { return new Component(T.HostName, T.HostSize, T.HostAlignment, T.TypeId); } public ComponentInfo GetComponentInfo() { return new ComponentInfo(HostName, HostSize, HostAlignment, TypeId); } }