Author Topic: UIInput: order of input text and submit not maintained at low framerates  (Read 13797 times)

wizardsmoke

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 5
  • Posts: 40
    • View Profile
When there happens to be a hitch or otherwise low framerate while the user is typing input, the order of their submit command relative to the rest of their input can change.  For example, if the user types "Hello World" and then presses Enter while experiencing poor performance, their input might be received instead as "Hello W", Enter, "orld".  Looks like this is due to the separate implementation of the submit key in the OnGUI method (via the UIInputOnGUI class).  This is probably true for other non-text input (such as backspace, arrow keys, copy, paste, etc.) that are processed by UIInputOnGUI.

Ideally, everything would happen in the order that the keys were actually pressed regardless of any performance issues.  The fact that it does not even further punishes users on lower-end machines that regularly experience poor performance.

Any ideas about how to remedy this problem?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput: order of input text and submit not maintained at low framerates
« Reply #1 on: October 30, 2014, 11:32:06 AM »
Everything related to input has to be hacked half way to Sunday in Unity. Just have a look inside the UIInput class to see the many #ifdefs and hacks I had to put in place just to get it to work.

Fun fact: Unity themselves have finally recently realized how stupid all of this is in their engine now that uGUI is running into all the same issues.

wizardsmoke

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 5
  • Posts: 40
    • View Profile
Re: UIInput: order of input text and submit not maintained at low framerates
« Reply #2 on: October 31, 2014, 07:32:28 AM »
Thanks for your reply.

It sounds like we'll just have to live with it for now.  Maybe Unity will make improvements soon that will allow a fix for this.  :-\