Search Unity

Capturing keyboard input with Input.anyKey in an iFrame

Discussion in 'Web' started by mattbrandmm, Dec 6, 2018.

  1. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    I'm having an issue with a game that seems like it's not detecting input using this code:

    Code (CSharp):
    1. private void Update()
    2. {
    3.     if (Input.anyKey)
    4.         CaptureInput();
    5. }
    Does anyone know if the Unity in WebGL can detect key presses using Input if it's within an iFrame?