Search Unity

EditorGUIUtility.QueueGameViewInputEvent doesn't seem to do anything.

Discussion in 'Immediate Mode GUI (IMGUI)' started by Madgvox, Dec 19, 2018.

  1. Madgvox


    Apr 13, 2014
    Trying to experiment with
    for an extension, but it seems like it doesn't actually do anything. Would love some light shed on this, given the incredibly sparse documentation. Google searches reveal a couple of other people mentioning this method, but no one indicates that it doesn't work. The super basic test script I'm using:

    Code (CSharp):
    1. void Update () {
    2.     EditorGUIUtility.QueueGameViewInputEvent( Event.KeyboardEvent( "s" ) );
    4.     if( Input.GetKeyDown( KeyCode.S ) ) {
    5.         Debug.Log( "s pressed" );
    6.     }
    7. }
    I've tried this ranging from 5.5 to 2018 just to be sure. Especially perplexing given that the GameView uses this function itself for game input, and that input obviously works.