- Home /
How to copy multiple input boxes and paste
Hello,
How can we select multiple input boxes at once, so that they can be copied over to another place ex: Notepad.
Thank you,
Another very important question that is still unanswered: http://answers.unity3d.com/questions/1354668/copy-paste-row-column-from-excel-into-unity-input.html
KZ
I dont understand the question. are you asking about GUI display text input boxes in unity? any inputs in unity would only be held in code and are not saved externally. and all unitys inputs are all stored in your code for access at anytime.
Okay,
So I know there's a code to put information into the clipboard,
I suppose then the question would be how to Copy EX: 10 GUI Display input text boxes at once, so that I can put that into a clipboard and then carry on to a different program...
its called systemCopyBuffer.
https://docs.unity3d.com/ScriptReference/EditorGUIUtility-systemCopyBuffer.html
Answer by toddisarockstar · May 20, 2017 at 02:36 AM
// need this at top of script
using UnityEditor;
string clipboard;
void Update () {
//paste like this
if (Input.GetKeyDown ("p")) {
EditorGUIUtility.systemCopyBuffer = "blah blah string";
}
//press the c key to get clipboard copy
if(Input.GetKeyDown("c")){
clipboard=EditorGUIUtility.systemCopyBuffer;
print("system clipboard is:"+clipboard);
}}