unity how to copy something to the clipboard

Code Example - unity how to copy something to the clipboard

                
                        GUIUtility.systemCopyBuffer = "test";
                    
                
 

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;
    }
}
                            
                        
 

Related code examples