GUIUtility
.keyboardControl
Manual
Reference
Scripting
Scripting
>
Runtime Classes
>
GUIUtility
GUIUtility
.keyboardControl
Menu
Overview
Runtime Classes
Attributes
Enumerations
Editor Classes
Enumerations
History
Index
GUIUtility
All Members
Class Variables
hotControl
keyboardControl
Class Functions
GetControlID
GetStateObject
GUIToScreenPoint
QueryStateObject
RotateAroundPivot
ScaleAroundPivot
ScreenToGUIPoint
static
var
keyboardControl :
int
Description
The controlID of the control that has keyboard focus.
JavaScripts
JavaScript
C#
Boo
// Click on the text field to see the id of the control.
private
var
str :
String
=
"A
String
!"
;
function
OnGUI
() {
str =
GUILayout.TextField
(str,10);
Debug.Log
(
"id: "
+
GUIUtility.keyboardControl
);
}
using UnityEngine;
using System.Collections;
public
class
example :
MonoBehaviour
{
private
string
str =
"A
String
!"
;
void
OnGUI
() {
str =
GUILayout.TextField
(str, 10);
Debug.Log
(
"id: "
+
GUIUtility.keyboardControl
);
}
}
import
UnityEngine
import
System.Collections
class
example(
MonoBehaviour
):
private
str as
string
= 'A
String
!'
def
OnGUI
():
str =
GUILayout.TextField
(str, 10)
Debug.Log
(('id: ' +
GUIUtility.keyboardControl
))