Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Experimentors Drop for New UI System?

Discussion in 'Input System' started by RandyBuchholz, Jan 31, 2020.

  1. RandyBuchholz

    RandyBuchholz

    Joined:
    Sep 23, 2016
    Posts:
    51
    Understanding you are all busy -
    It seems that a runtime for the new UI System is getting close to a preview. Any chance of seeing an experimental drop of the Input System that works (at least at a basic level) with that at the same time?
     
  2. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    JoNax97 likes this.
  3. RandyBuchholz

    RandyBuchholz

    Joined:
    Sep 23, 2016
    Posts:
    51
    @recursive Thanks! I was still using the code from the demo.

    I'm not finding a link for the package. Tried by manifest - guessing at the name since there is already a uielements 1.0.0 in my project (the editor?)

    "com.unity.modules.uielementsruntime": "0.0.4-preview" but that didn't work.
     
    Last edited: Feb 2, 2020
  4. ilyaryzhenkov

    ilyaryzhenkov

    Joined:
    Mar 4, 2017
    Posts:
    6
    That would be
    "com.unity.ui.runtime": "0.0.4-preview"
    , but it doesn't help with the new InputSystem. They simply don't work together because UIElements event system reads from Input directly. I managed to create my own event system and it more or less works, but there are missing things – e.g. can't translate coordinates properly because ScreenToPanel is internal in PanelRenderer, and even copying the code is not possible, because scale is not accessible either… Also, keyboard (in text inputs) doesn't work at all, it is too tied up with internal IME stuff in Input.
     
  5. RandyBuchholz

    RandyBuchholz

    Joined:
    Sep 23, 2016
    Posts:
    51
    @ilyaryzhenkov Thanks, that did it. I'm doing something similar and mostly bypassing the internals. But not getting keyboard into text boxes will be a showstopper for me.
     
  6. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    I assume proper integration is planned for later this year as the new Input System goes into 1.0.0 release soonish.
     
  7. ilyaryzhenkov

    ilyaryzhenkov

    Joined:
    Mar 4, 2017
    Posts:
    6
    @recursive I think it's not only InputSystem that needs changes, I believe UIElements should also be updated. It needs
    UIElementsInputSystemEventSystem
    (oh… may be something different) to route InputSystem actions to Panels, taking into account transforms for proper raycasting, keyboard IME stuff, capturing events (so that keyboard events are routed to text input when focused instead of activating actions), etc.

    Basically, both teams need to work together to make it good quality integration, and not like it seems to be now with copying BaseInput into InputWrapper, throwing some more WD40 and duct tape on it and calling it a day :)
     
  8. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Integration work is in the queue. No definite release date yet. All that's certain at this point is that by the time UIElements is officially supported in the player, there'll also be integration with the input system.