using System.Runtime.InteropServices; using gaemstone.ECS; using gaemstone.Utility; using static flecs_hub.flecs; namespace gaemstone.Flecs.Systems; [Module, Path("/flecs/monitor")] public unsafe class Monitor : IModuleInitializer { public void Initialize(EntityRef module) { using var alloc = TempAllocator.Use(); ecs_import_c(module.World, new() { Data = new() { Pointer = &MonitorImport } }, alloc.AllocateCString("FlecsMonitor")); } [UnmanagedCallersOnly] private static void MonitorImport(ecs_world_t* world) => FlecsMonitorImport(world); }