UnityEngine.TextEditor.OnFocus C# (CSharp) Method

OnFocus() public method

public OnFocus ( ) : void
return void
        public void OnFocus()
        {
            if (this.multiline)
            {
                int num = 0;
                this.selectIndex = num;
                this.cursorIndex = num;
            }
            else
            {
                this.SelectAll();
            }
            this.m_HasFocus = true;
        }

Usage Example

コード例 #1
0
 public static void CopyToClipboard(string str)
 {
     TextEditor te = new TextEditor();
     te.text = str;
     te.OnFocus();
     te.Copy();
 }
All Usage Examples Of UnityEngine.TextEditor::OnFocus