Skip to content

SaiiPrashanth/Unity_CrossProjectCopier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Cross Project Copier

A Unity Editor context-menu tool that copies component data as JSON and pastes it onto GameObjects, including across different Unity projects through the system clipboard.

Demo

Demo

Overview

Moving tuned component values between scenes or projects is usually manual and error-prone. This tool serializes one or many components from a source GameObject, places the payload in the clipboard, then reconstructs the matching components on a target GameObject.

If a component type is missing in the destination project, the tool safely skips it and logs a warning.

Menu Path

All commands are available in the component context menu:

CONTEXT/Component/Cross-Project Copier/

Commands:

  • Copy This Component
  • Copy All Components
  • Paste This Component(s)
  • Paste All Components

Usage

  1. Add Editor/CrossProjectCopier.cs to an Editor/ folder in both source and destination projects.
  2. In the source project, right-click a component and choose Copy This Component or Copy All Components.
  3. Open the destination project and select the target GameObject.
  4. Right-click a component and choose Paste This Component(s) or Paste All Components.
  5. Check the Console for success, skipped component types, or errors.

Features

  • Single Component Copy: Copy only the clicked component from the inspector context menu.
  • Bulk Component Copy: Copy all components from a GameObject in one action.
  • Clipboard Transport: Uses GUIUtility.systemCopyBuffer so data can be pasted in another Unity project.
  • Auto Add Missing Components: Adds a missing destination component before applying data.
  • Undo Support: Registers hierarchy undo for paste operations.
  • Validation Guards: Paste options only enable when clipboard payload is valid.

Script Reference

Editor/CrossProjectCopier.cs

  • CopyToClipboard(Component[]): Serializes type name + JSON for each component.
  • PasteToGameObject(GameObject): Deserializes clipboard payload, creates missing components, and overwrites fields.
  • TryGetClipboardPayload(...): Validates and parses clipboard JSON.
  • GetTargetGameObject(MenuCommand): Resolves context object or current selection.

License

This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2025 ARGUS

About

Unity Editor context-menu tool to copy and paste component data as JSON via clipboard, including safe transfers across different Unity projects.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages