public static string GetTextFromClipboard() { var te = new UnityEngine.TextEditor(); te.Paste(); return(te.text); }
public static string GetText() { var ed = new TextEditor(); ed.Paste(); return ed.content.text; }
public void CopyText() { var copyString = "TestStrrrring"; var expectedString = copyString; Utilities.CopyStringToBuffer(copyString); var editor = new TextEditor(); editor.Paste(); Assert.AreEqual(expectedString, editor.text); }
/// <summary> /// /// </summary> /// <param name="textField"></param> public static void OnPaste(InputTextField textField) { TextEditor te = new TextEditor(); te.Paste(); #if UNITY_5_3_OR_NEWER string value = te.text; #else string value = te.content.text; #endif if (!string.IsNullOrEmpty(value)) textField.ReplaceSelection(value); }
static void OnPaste(EventContext context) { TextField target = (TextField)context.data; TextEditor te = new TextEditor(); te.Paste(); #if (UNITY_5_3 || UNITY_5_4) string value = te.text; #else string value = te.content.text; #endif if (!string.IsNullOrEmpty(value)) target.ReplaceSelection(value); }
private string GetClipboard() { TextEditor te = new TextEditor(); te.Paste(); return te.content.text; }
/// <summary>Pastes the text from the clipboard.</summary> public static string Paste(){ TextEditor editor=new TextEditor(); editor.content.text=""; editor.Paste(); return editor.content.text; }
public string PasteFromClipboard() { TextEditor textEditor = new TextEditor(); textEditor.Paste(); return textEditor.text; }
public string PasteFromClipboard() { TextEditor editor = new TextEditor(); editor.Paste(); return editor.content.text; }