using Unity.Entities; namespace ProjectM.Simulation { /// /// Pure save-apply helpers shared by the server spawn system (born-correct load) and EditMode tests. /// Burst-safe: unmanaged, non-generic, no enums (avoids the cross-assembly-generic Burst ICE class). /// public static class SaveApply { /// Replace a StorageEntry ledger buffer's contents with a staged PendingSaveLedgerRow buffer. public static void WriteLedger(DynamicBuffer src, DynamicBuffer dest) { dest.Clear(); for (int i = 0; i < src.Length; i++) dest.Add(new StorageEntry { ItemId = src[i].ItemId, Count = src[i].Count }); } } }