Add Ctrl+Z/Ctrl+Y undo/redo with command-based network sync
Pointer-based per-painter history of the canonical maps with copy-on-write sharing (only maps touched by a stroke are cloned). A stroke (press..release) is one step; a Load resets the history to the loaded maps as the sole baseline. Network sync replicates undo/redo as tiny checkpoint/restore commands instead of broadcasting full map snapshots: every peer runs the same COW history keyed by owner-assigned checkpoint ids and reproduces restores locally. A peer that cannot reproduce a target (undo across its join boundary) requests a targeted snapshot from the owner as fallback. Hardening: ordered send FIFO keeps stamps + checkpoints + restores in production order (a marker never overtakes the stamps it finalizes); stamp overflow carries over to the next frame instead of being decimated, so remote content matches the owner; remote always inserts the checkpoint id to stay 1:1 aligned. Owner-authoritative snapshot fallback replaces the silent host no-op. Adds a logSync toggle (default on) tracing when each checkpoint/restore/snapshot is sent, applied, or falls back. Also includes paintings-panel layout tuning in PaintHudPanel.prefab (inspector edits). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee482905f9
commit
301f7e64cb
8 files changed
+619
-78
No files matched your search
@@ -3527,7 +3527,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6115439559885354559
|
||||
MonoBehaviour:
|
||||
@@ -3542,10 +3542,10 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 6
|
||||
m_Right: 6
|
||||
m_Top: 6
|
||||
m_Bottom: 6
|
||||
m_Left: 4
|
||||
m_Right: 4
|
||||
m_Top: 4
|
||||
m_Bottom: 4
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 3
|
||||
m_ChildForceExpandWidth: 1
|
||||
|
||||
Reference in new issue
Block a user