Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

simulating or forcing Event.current in nunit unit tests?

Discussion in 'Scripting' started by junglemason, Aug 22, 2018.

  1. junglemason

    junglemason

    Joined:
    Dec 30, 2010
    Posts:
    69
    I'm writing integration tests for an editor customization (IMGUI etc.). In my test, I'd like to simulate the Shift key being held down (Event.current.shift), but the current event is always null. Any way to simulate that?