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); }
//--------------------------------------------------------------------- // 从剪切板中获取拷贝的text public string GetClipBoard() { return(BlankOperationClipboard.GetValue()); }
//--------------------------------------------------------------------- // 拷贝text到剪切板 public void SetClipBoard(string text) { BlankOperationClipboard.SetValue(text); }