Answers for "unity copy to clipboard"

C#
2

unity how to copy something to the clipboard

GUIUtility.systemCopyBuffer = "test";
Posted by: Guest on November-01-2020
0

copy to clipboard unbity

//Add this to any class and just set it with clipboard = "text";
 
 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();
   }
}
Posted by: Guest on April-07-2020
0

unity copy to clipboard

using UnityEngine;

public static class ClipboardExtension
{
    /// <summary>
    /// Puts the string into the Clipboard.
    /// </summary>
    public static void CopyToClipboard(this string str)
    {
        GUIUtility.systemCopyBuffer = str;
    }
}
Posted by: Guest on October-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language