Hi,
I’m trying to copy to clipboard (for ios & Android) a string when a player click on “Copy” button.
My script :
using UnityEngine;
using System.Collections;
using UnityEditor;
public class copyscript : MonoBehaviour {
public void CopyToClipboard( string str ){
EditorGUIUtility.systemCopyBuffer = str;
}
}
I have to put my script in “Editor” Folder because i’m using UnityEditor.
It’s actually the first time i have to use a script in Editor folder, i don’t know how to launch my public function.
I can’t attach my script to a GameObject because it’s in Editor Folder…
How to use my script now?
Thanks