GUI.TextField and Input.GetKeyDown("enter")

Hey Guys,

Forgive me if the answer is obvious and I missed it.

I have an element using GUI.TextField but Input.GetKeyDown doesn’t seem to register while the TextField is receiving input (Time.timeScale is also set to 0 at this point).

I’m trying to figure out a way that when pressing enter on TextField element, I can call a function or a set of instructions.

How would you go about doing this?

Thank you!

David

where are you getting the Input? on the FixedUpdate?, if yes, then as your timeScale is 0, all what is done in the fixed update gets “paused” as far as i know…

try the Input.GetKeyDown(KeyCode.Enter) not sure if its like that, check on the manual, but as a suggestion, use KeyCode always instead of strings :slight_smile:

Thank you very much I appreciate it! Works great :slight_smile: