Search Unity

Official Feedback wanted : new Input system support

Discussion in 'UI Toolkit' started by antoine-unity, Sep 2, 2020.

  1. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    699
    Hello, this is unrelated to the thread topic, can you make a separate thread? Thanks!
     
  2. ysxdead

    ysxdead

    Joined:
    Sep 1, 2019
    Posts:
    4
    So at the moment if you've got two objects (could be in separate scenes) with the following components:
    • UIDocument with its own visual tree asset
    • EventSystem
    • Input System UI Input Module
    Start with object A enabled, then disable it and enable object B, input is no longer recognised what-so-ever on object b's UI document.

    This might sound contrived, but if you imagine you're building a game with multiple scenes with their own UIs (for example switching from a main menu scene with its UI to a player scene with a UI), you can imagine why you'd expect this to work. I do have a minimally reproducible project if anyone wants it.

    The workaround would be to swap the visual tree asset at runtime, I think.
     
  3. KillHour

    KillHour

    Joined:
    Oct 25, 2015
    Posts:
    49
    That assumes I want the player to only be able to interact with one part of the screen or another. In my game, you select something on a map and that populates a context bar with options for that thing. You need to be able to interact with the context bar without affecting what is selected on the map, but you also need to be able to select something else on the map as well.
     
  4. Deleted User

    Deleted User

    Guest

  5. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    Hi all.
    1. I know hw to use the new IS
    2. I can do basics with UI Toolkit and I also understand that for transitioning between screens on Kb input I should have a manager uxml that hides/show uxmls -- though what I have learned has 0 connection to the new IS..

    I have no clue, nor I understand how to use these 2 together.
    Goal is to manipulate the UI throgh actions from IS so that I can map them to different platform inputs as this is the new IS goal).

    Can someone explain the workflow please ?
    Shouldn't UNITY provide examples and support for this so that people embrace it faster ?

    -----------
    There is 0 content regarding the above or maybe just some short responses.
    UNITY gurus, are you even listening to people that asked this even before me ?
     
    JeffreyBennett likes this.
  6. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
  7. JeffreyBennett

    JeffreyBennett

    Joined:
    May 18, 2017
    Posts:
    25

    I'm in a similar boat.

    Description
    I'm developing a project using both the New Input System and the UIToolKit and running into significant problems getting them to work together. The UIToolKit seemed like just the thing, and since it is released in my version of Unity (2021.3.8f1), I figured I could implement it easily, but I think it's not ready for Prime Time.

    Design Parameters
    Also, I need this game to work with both Mouse and Keyboard as well as a Gamepad. I have one menu that is exclusively UIToolKit (no UIEventSystem in that scene), but cannot get the gamepad to operate that. I have another menu that works fine in UIToolKit's preview, but not in the game window in the Unity editor.

    Problem
    The problem I'm seeing is in trying to create a HUD display for score / progress tracking that allows a pop-up menu with buttons for settings like look inversion (gamepad only), master volume, exiting the game, etc. However, while I can get the menu to pop-up and dismiss with keyboard keys / gamepad buttons, the buttons on the menu will not register mouse enter / leave events or clicks.

    Path Forward
    The big frustration is that I cannot be certain whether the problem is due to me making a mistakes or bad assumptions or whether the two systems just are not ready yet to be implemented together. I would LOVE to be able to reassure myself that it's just me, and that Unity's two systems will work together just fine, but I don't have that confidence.

    If it's just me then more research can tell me what I'm doing wrong and I can get my plan to work. On the other hand, if the two systems are incompatible, then I need to cut my losses, redesign, and try this again in a year or two.

    Conclusion
    The thing that tells me it's NOT just my skill level impeding progress, and rather Unity's two systems ARE incompatible, is that I cannot find any tutorials or articles showing what I'm trying to do. That's a bad sign.
     
    Last edited: Aug 31, 2022
    ScopeDopeBC, ysxdead and Ochachaba like this.
  8. marcobethkeskyered

    marcobethkeskyered

    Joined:
    Nov 7, 2022
    Posts:
    6
    Hello, what is the current status of UI Toolkit with the new input system?

    I am having zero success making it work
     
  9. dlorre

    dlorre

    Joined:
    Apr 12, 2020
    Posts:
    699
    It works ok-ish but you need to add the EventSystem yourself. It's not perfect because of the issues with TAB and gamepad navigation that apparently won't be fixed but I don't think that the old input system is better for that.