Search Unity

Help: using new input system for psychological experiment

Discussion in 'Input System' started by bvoloh, Oct 15, 2016.

  1. bvoloh

    bvoloh

    Joined:
    Nov 5, 2015
    Posts:
    3
    Hi all,

    Apologies in advance if this is the wrong place for this post, but I've been lurking here and trying to figure it out on my own with no luck. We're using Unity to develop a psychological experiment, where people use a keyboard to respond to events that happen on the screen. We need very precise knowledge of the input times (with a resolution of 1-3 ms), and I've tried to implement the prototype input system for this purpose. Now, I know the FAQ says that you cant poll inputs at a higher frequency than the frame rate, but I don't know when it was last updated, and have gotten confused by some other posts that have been made. My guide has been a comment from this post:

    https://blogs.unity3d.com/2016/04/12/developing-the-new-input-system-together-with-you/

    "In the prototype you can hook yourself into the event tree (basically a tree of subscribers) and then you’ll get callbacks. The details of event distribution are still a bit up in the air as we’re trying to make something happens that works in a bit of a wider context than just input but I don’t think the fact that you can get notifications is going to change."

    So my question is, how exactly do I hook myself into the event tree? Is this even the correct way of going about getting accurate input times with the prototype system?

    Any help/guidance would be appreciated.
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    The input prototype is build on top of the current input system and won't be able to get you any more accurate time information than you can get by using just the regular Unity input API.

    Only once we have the new back-end in place will more accurate time information be available. There may also be some solutions on the Asset Store that make this possible today by bypassing the Unity input system entirely, but I can't remember the details.
     
  3. bvoloh

    bvoloh

    Joined:
    Nov 5, 2015
    Posts:
    3
    Ok, thanks for the reply! We're looking forward to using it :)