Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/GameFrameX/com.gameframex.unity.operationclipboard

Unity Operation Clipboard/Unity 操作Android和iOS 文字粘贴板
https://github.com/GameFrameX/com.gameframex.unity.operationclipboard

android-sdk clipboard clipboard-copy clipboard-extension clipboard-management clipboard-manager unity unity-3d unity-asset unity-editor unity-scripts unity3d unity3d-games unity3d-plugin

Last synced: 4 months ago
JSON representation

Unity Operation Clipboard/Unity 操作Android和iOS 文字粘贴板

Awesome Lists containing this project

README

        

# Unity 读写Android 和 iOS 的粘贴板插件

该库主要服务于 `https://github.com/AlianBlank/GameFrameX` 作为子库使用。

# 使用方式(三种方式)

1. 直接在 `manifest.json` 文件中添加以下内容
```json
{"com.gameframex.unity.operationclipboard": "https://github.com/AlianBlank/com.gameframex.unity.operationclipboard.git"}
```
2. 在Unity 的`Packages Manager` 中使用`Git URL` 的方式添加库,地址为:https://github.com/AlianBlank/com.gameframex.unity.operationclipboard.git

3. 直接下载仓库放置到Unity 项目的`Packages` 目录下。会自动加载识别

# 改动功能

1. 增加 `link.xml` 的裁剪过滤

# DEMO

```csharp

using UnityEngine;

public class BlankOperationClipboardDemo : 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);
}
}

```