Skip to content

GameFrameX/com.gameframex.unity.operationclipboard

Repository files navigation

Game Frame X Logo

Game Frame X Operation Clipboard

License Version Documentation

All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams

Documentation · Quick Start · QQ Group

English | 简体中文 | 繁體中文 | 日本語 | 한국어


Project Overview

Operation Clipboard - A cross-platform clipboard access plugin for Unity. Provides unified read/write operations for the system clipboard across platforms:

  • Editor/Standalone: TextEditor API
  • WebGL: Douyin Mini Game SDK / WeChat Mini Game SDK
  • Android: JNI bridge
  • iOS: P/Invoke

Includes link.xml for IL2CPP stripping prevention.

Quick Start

Installation

Edit your Unity project's Packages/manifest.json and add the scopedRegistries section:

{
  "scopedRegistries": [
    {
      "name": "GameFrameX",
      "url": "https://gameframex.upm.alianblank.uk",
      "scopes": [
        "com.gameframex"
      ]
    }
  ]
}

Then add the package to dependencies:

{
  "dependencies": {
    "com.gameframex.unity.operationclipboard": "1.2.1"
  }
}

scopes controls which packages are resolved through this registry. Only packages whose names start with com.gameframex will be fetched from it.

Usage Examples

using UnityEngine;

public class ClipboardDemo : MonoBehaviour
{
    private string text = "demoText";
    private string result = "";

    void OnGUI()
    {
        text = GUILayout.TextField(text, GUILayout.Width(500), GUILayout.Height(100));

        if (GUILayout.Button("SetValue", GUILayout.Width(500), GUILayout.Height(100)))
        {
            BlankOperationClipboard.SetValue(text);
        }

        if (GUILayout.Button("GetValue", GUILayout.Width(500), GUILayout.Height(100)))
        {
            result = BlankOperationClipboard.GetValue();
        }

        GUILayout.Label(result);
    }
}

Platform Support

Platform Supported
Windows Yes
macOS Yes
Android Yes
iOS Yes
WebGL (Douyin Mini Game) Yes
WebGL (WeChat Mini Game) Yes

Documentation & Resources

Community & Support

License

See LICENSE.md for license information.