Frontend menu + settings + saves foundation
Netcode frontend pattern: UITK main menu / pause / settings (MenuUi + controllers), on-demand world lifecycle (WorldLauncher/SessionRunner), GameBootstrap menu branch; Graphics/Audio settings (SettingsService/GameVolume); single-slot save foundation (SaveData/SaveService, born-correct load at director spawn, autosave on Siege->Calm + quit); RuntimePanelSettings + theme; BuildTool menu; 10 EditMode tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Unity.Entities;
|
||||
|
||||
namespace ProjectM.Simulation
|
||||
{
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
public static class SaveApply
|
||||
{
|
||||
/// <summary>Replace a StorageEntry ledger buffer's contents with a staged PendingSaveLedgerRow buffer.</summary>
|
||||
public static void WriteLedger(DynamicBuffer<PendingSaveLedgerRow> src, DynamicBuffer<StorageEntry> dest)
|
||||
{
|
||||
dest.Clear();
|
||||
for (int i = 0; i < src.Length; i++)
|
||||
dest.Add(new StorageEntry { ItemId = src[i].ItemId, Count = src[i].Count });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user