UnityEngine.TextEditor.Paste C# (CSharp) Method

Paste() public method

public Paste ( ) : bool
return bool
        public bool Paste()
        {
            string systemCopyBuffer = GUIUtility.systemCopyBuffer;
            if (systemCopyBuffer != "")
            {
                if (!this.multiline)
                {
                    systemCopyBuffer = ReplaceNewlinesWithSpaces(systemCopyBuffer);
                }
                this.ReplaceSelection(systemCopyBuffer);
                return true;
            }
            return false;
        }

Usage Example

コード例 #1
0
    public static string GetTextFromClipboard()
    {
        var te = new UnityEngine.TextEditor();

        te.Paste();
        return(te.text);
    }
All Usage Examples Of UnityEngine.TextEditor::Paste