Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

UnityEngine.EventSystems

Discussion in 'New Input System' started by ChrisJohnson, Mar 8, 2019.

  1. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    44
    I was wondering, does EventSystems work with the new input system.

    So will these handlers work, when using the new input system.
    IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerClickHandler, IPointerUpHandler, IBeginDragHandler, IDragHandler, IEndDragHandler
     
  2. dougpunity3d

    dougpunity3d

    Unity Technologies

    Joined:
    Jul 11, 2018
    Posts:
    16
    Yes you can use those. You do have to make sure that your player settings "Active Input Handling" is set to "Both" . Using the EventSystems is a mix of old and new systems. If you take a look at OnScreenButton.cs in the package, its using IPointerDownHandler, IPointerUpHandler
     
    ChrisJohnson likes this.
  3. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    44
    Cool, Right now I have the Active Input Handling set to both, and the handlers are working like you said. But I was wondering if there is a way to get the handlers to work with just the new input system, and if not are they ever going to work with the new input system?
     
  4. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    858
    There's a new input module (UIActionInputModule) to replace StandaloneInputModule (the legacy input module) with. However, it still hasn't seen a lot of testing and there's issues to be expected. Some further work on it is scheduled. But it may already do the trick for you.

    To use it, remove the StandaloneInputModule component from the EventSystem object and add UIActionInputModule instead. After that, the various actions need wiring up to actually get input. When we've done a pass on this, it'll get simpler. Ultimately it'll hopefully be fully automatic.
     
    ChrisJohnson likes this.
  5. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    44
    Nice, that should work for my purposes. I'm just glad that there is a replacement for the old EventSystem stuff.