So I have this script:
void OnGUI () {
// Enable Word warp
GUI.skin.label.wordWrap = true;
// Make a background box
GUI.Box(new Rect(10,10,300,150), "Chat with a Chatbot");
// Make output label
GUI.Label (new Rect (20, 30, 280, 40), Output_Text);
// Make a text field that modifies Input_Text.
Input_Text = GUI.TextField (new Rect (20, 100, 280, 20), Input_Text, 100);
// If send button or enter pressed
if(((Event.current.keyCode == KeyCode.Return)||GUI.Button(new Rect(250,130,50,20),"Send")) && (Input_Text != "")) {
// Prepare Variables
// You don't need to care, wether Only Jurassics or only Program #'s Variables
// are changed. This is managed immediate intern every time you change a global
// variable in Program # or Jurassic.
// bot.jscript_engine.SetGlobalValue("abc",15);
request.rawInput = Input_Text;
request.StartedOn = DateTime.Now;
result = bot.Chat(request);
Output_Text = result.Output;
Input_Text = "";
// Gather Variables
// bot.jscript_engine.GetGlobalValue<string>("abc");
}
}
And I need to access GUI.Button "Send". I tried dragging the script into a State, but I'm not sure what to select to access that button. Any thoughts?
Thanks!