-
-
Save guimaraf/51b6ee715ed5989c74af476045a138a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CopyToClipboardUnity : MonoBehaviour | |
{ | |
[SerializeField] private string myText; | |
public void OnButtonCopyClipboardClicked() | |
{ | |
TextEditor textForCopy = new TextEditor | |
{ | |
text = myText | |
}; | |
textForCopy.SelectAll(); | |
textForCopy.Copy(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment