namespace LyraApi.Ecs; using ImportsWorld.wit.imports.lyra.api; using LyraApi; public class World(IEcs.EcsWorld world) { private IEcs.EcsWorld Inner { get; set; } = world; public Entity Spawn(params IComponent[] comps) { List infos = comps.Select(c => c.GetComponentInfo()).ToList(); byte[] bytes = comps.SelectMany(c => Marshalling.GetBytes(c)).ToArray(); return new Entity(Inner.Spawn(bytes, infos)); } }