Search Unity

Input System Enter Play Mode Options (Reload Domain) support

Discussion in 'Input System' started by mitaywalle, Jun 23, 2020.

  1. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
  2. detzt

    detzt

    Joined:
    Oct 6, 2018
    Posts:
    21
    The combination is working fine for me, maybe the documentation is simply outdated?
     
  3. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    The status is that is indeed not officially supported. As in, we have not done work to explicitly support it.

    From our and other people's testing it *seems* to work fine ever since some updates we did some time ago but... until we've gone in and properly verified we're equipped for this, it remains an "unofficial" kind of thing :)
     
  4. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    In my case Editor accidentaly crashes at Playmode button press, if reload domain is off and new Input system is active. Ok so, thanks for info, will wait for manual update info about support. Good luck!
     
  5. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    I'm getting NullReferenceExceptions with Enter Play Mode Options active, and when using my own UI actions (not the DefaultInputActions that comes with the Input System) in the InputSystemUIInputModule. Would love for this to be resolved.
     
  6. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Has this been fixed in the 1.1 previews considering that the limitation has been removed from the docs?
     
  7. unity_YDC-MQronvpOHQ

    unity_YDC-MQronvpOHQ

    Joined:
    Apr 18, 2020
    Posts:
    1
    I tried disabling demain reload but it didn't worked with Input system 1.0.2 wich is the latest verified version, I updated to Input system 1.3 and it worked perfectly, entering play mode is now super fast. I guess we need to wait for this package to be verified on the latest versions!
     
  8. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    232
    I'm still having issues where handlers for
    performed
    are not cleared, so when Playing / Stopping repeatedly, additional handlers are added to an event (and the handler is called multiple times when the input is performed.

    Even unsubscribing the handlers in
    OnApplicationQuit
    (as below) does not work:

    Code (CSharp):
    1. public InputActionReference MyAction;
    2.  
    3. void Awake()
    4. {
    5.   MyAction.action.performed += HandleActionPerformed;
    6. }
    7.  
    8. void OnApplicationQuit()
    9. {
    10.   MyAction.action.performed -= HandleActionPerformed;
    11. }
    12.  
    13. void HandleActionPerformed()
    14. {
    15.   // This will start getting called multiple times, for each time Play Mode is entered
    16. }
     
  9. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    Hello, you should unsubscribe before subscribe, it will work in your case:

    Code (CSharp):
    1. void Awake()
    2. {
    3.   MyAction.action.performed -= HandleActionPerformed;
    4.   MyAction.action.performed += HandleActionPerformed;
    5. }
     
  10. gg_michael

    gg_michael

    Joined:
    Sep 24, 2012
    Posts:
    73
    @Rene-Damm What is the status on this? Will this ever be officially supported? In version 1.3.0 and editor 2022.1 I still get strange behavior with domain reloading disabled. Specifically callbacks from a generated InputActions class just stop being called. So the (action).OnActionName(context) callback just... stops responding.
     
    AldeRoberge, ytajimi, Edacth and 4 others like this.
  11. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    At the game start try to disable InputActionAsset before enabling it back.
    In my case it looks like this:
    Code (CSharp):
    1.  
    2. InputActionAsset inputActions = BootstrapContext.Instance.InputActions;
    3. inputActions.Disable();
    4. inputActions.Enable();