system
1
var stringToEdit : String = "Hello World";
function OnGUI ()
{
stringToEdit = GUI.TextField (Rect (10, 10, 200, 20),stringToEdit,GUIContent ("start1"));
if(GUI.tooltip == "start1")
{
GUI.Label (Rect (130,835,300,40), "enter in text field");
}
}
BCE0023: No appropriate version of 'UnityEngine.GUI.TextField' for the argument list '(UnityEngine.Rect, String, UnityEngine.GUIContent)' was found.
when i am trying to use tool tip text field
var stringToEdit : String = "";
function OnGUI()
{
stringToEdit = GUI.TextField(Rect(10, 10, 200, 20), stringToEdit, 25);
GUI.Label(Rect(10, 10, 300, 50), GUIContent(" ", "label1"));
if (GUI.tooltip == "label1")
{
GUI.Label(Rect(210, 30, 300, 40), "enter in text field");
}
}
Check the reference on GUI.TextField. None of the parameters are of type GUIContent, yet you try to supply one.
Error happens here:
stringToEdit = GUI.TextField(…, …, GUIContent(“start1”));
I guess you need to set the tooltip manually if the mouse is over the rect.