Search Unity

When in game loop do OnPointerDown etc (IEventSystemHandler) events get called?

Discussion in 'Scripting' started by andyz, Feb 9, 2018.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Do pointer and drag events (IEventSystemHandler style calls) get called before Updates on monobehaviours in the scene or is it undefined?
    Also if you have a Physics Raycaster when is that fired?
     
  2. Necromantic

    Necromantic

    Joined:
    Feb 11, 2013
    Posts:
    116
    Last edited: Feb 9, 2018
  3. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906
  4. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Ok wonder if runs before others others or at random - anyway does what it needs to but I am doing my own raycasts after finding Physics Raycaster seemingly conflicting with other raycasts or out of step with the scene
     
  5. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    I swear this changed in 2017.3.1 but in any case I am now getting events between Update and LateUpdate which means if I want less cursor-lag I have to do any drag code in LateUpdate now not the more obvious "Update".
    This seems wrong