using GamecraftModdingAPI.Players; using Svelto.ECS.EntityStructs; using Unity.Mathematics; namespace GamecraftModdingAPI { public class FlyCam { private static FlyCamEngine Engine; public uint Id { get; } public FlyCam(uint id) => Id = id; public unsafe float3 Position { get => Engine.GetComponent(Id).Map(pos => &pos->position); set => Engine.GetComponent(Id).Map(pos => &pos->position).Set(value); } public static void Init() { Engine = new FlyCamEngine(); } } }