Search Unity

InputProcessor and if value changed

Discussion in 'Input System' started by io-games, Oct 8, 2019.

  1. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    104
    If you create simple InputProcessor and add to mouse position for example. You will see it calls only when original value changed.

    Is there any way to call it every frame?
    It needs when processor output value depends not from only input value, but also depends from Time for example.
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Input processors are only called when a value is queried. If no one queries the value of a control in a frame, no call happens.

    Also note that ATM processors cannot be stateful.
     
    io-games likes this.