Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Can't interact with In-game UI

Discussion in 'Input System' started by Gydiah, Apr 28, 2021.

  1. Gydiah

    Gydiah

    Joined:
    Feb 15, 2020
    Posts:
    5
    Hello,
    I'm working with the new Input System (Preview 1.1.0 - Preview 3) and even after reading a lot of threads about my problem, I can't figure where does my problem come from.

    -------------------------------------------------
    [PROBLEM OBSERVED]

    I got an "Input Action Preset" with 2 Maps :
    - Player
    - UI

    I also got 2 scenes :
    - Main menu (which is only UI)
    - Game Dev (where there are 3D objects and in game UI)

    In edit mode :
    - Main menu react to the mouse and everything works great
    - Game Dev "Player" inputs works great, but the UI doesn't react (IsPointingOverGameObject is always equal to false)

    In build :
    - Nothing worked at first, but after some time the Main Menu worked again (but not the Game Dev, as in edit mode)

    -------------------------------------------------
    [PICTURES]

    I'm kinda struggling to understand how to plug the different action maps to make it work, here are the pictures of my Main Menu then Game Dev setup :

    Player Inputs :
    Player Inputs.PNG
    UI Inputs :
    UI Inputs.PNG

    Main Menu Event System :
    Main Menu Event System.PNG
    Game Dev Event System :
    Game Dev Event  System.PNG

    -------------------------------------------------
    [QUESTIONS]
    - Player Inputs are setup in code, but I don't know if I need to set UI event by myself, the problem could comes from there ?
    - I can't switch the Default Map while in Game Dev cause it would cancel me from moving or using Player Inputs, I supposed that the Input System UI Input Module is working by itself with the given Inputs, is that right ?

    The only way to make the Game Dev UI works is to Disable then Enable the "Input System UI Input Module", but I really don't know why

    I really tried to find an answer by myself, but even after spending so much time I really can't tell why it's not working, any help would be welcome

    Thanks for reading !
     
    Last edited: Apr 28, 2021