Skip to content

Copy/Paste/Cut operations#17

Open
Red-Cat-Fat wants to merge 4 commits into
elmortem:masterfrom
Red-Cat-Fat:master
Open

Copy/Paste/Cut operations#17
Red-Cat-Fat wants to merge 4 commits into
elmortem:masterfrom
Red-Cat-Fat:master

Conversation

@Red-Cat-Fat
Copy link
Copy Markdown
Contributor

@Red-Cat-Fat Red-Cat-Fat commented May 5, 2026

Motivation

  • Provide basic clipboard operations for serialize-reference fields so values (references) can be moved or shared between fields.
  • Ensure copy/paste semantics preserve the original reference (not deep-clone) so mutations affect all pasted locations.

Description

  • Added a simple editor clipboard SRClipboard that holds a single ManagedReferenceValue and exposes HasValue (SerializeReferenceEditor/Assets/SREditor/Package/Editor/Scripts/SRActions/SRClipboard.cs).
  • Implemented Copy, Paste, and Cut actions as CopyPropertySRAction, PastePropertySRAction, and CutPropertySRAction respectively, where Copy stores the reference, Paste assigns the stored reference to the target field, and Cut stores the reference then clears the source field (SerializeReferenceEditor/Assets/SREditor/Package/Editor/Scripts/SRActions/CopyPropertySRAction.cs, PastePropertySRAction.cs, CutPropertySRAction.cs).
  • Added Undo support for destructive/applying operations in Paste and Cut and applied modified properties after changes.
  • Wired the new actions into the action factory and the search window menu so they appear alongside Erase (SRActionFactory.cs and SRTypesSearchWindowProvider.cs).

@Red-Cat-Fat Red-Cat-Fat changed the title Merge Update Copy/Paste/Cut operations May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant