unity copy clipboard code example
Example 1: unity how to copy something to the clipboard
GUIUtility.systemCopyBuffer = "test";
Example 2: copy to clipboard android studio
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText(label, text);
clipboard.setPrimaryClip(clip);
Example 3: copy to clipboard unbity
internal static string Clipboard {
get
{
TextEditor _textEditor = new TextEditor();
_textEditor.Paste();
return _textEditor.text;
}
set
{
TextEditor _textEditor = new TextEditor
{text = value};
_textEditor.OnFocus();
_textEditor.Copy();
}
}