该库主要服务于 https://github.com/AlianBlank/GameFrameX 作为子库使用。
直接在 manifest.json 文件中添加以下内容
{"com.gameframex.unity.operationclipboard": "https://github.com/AlianBlank/com.gameframex.unity.operationclipboard.git"}
在Unity 的Packages Manager 中使用Git URL 的方式添加库,地址为:https://github.com/AlianBlank/com.gameframex.unity.operationclipboard.git
直接下载仓库放置到Unity 项目的Packages 目录下。会自动加载识别
link.xml 的裁剪过滤
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);
}
}