Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

WebGL Touch support

Discussion in 'WebGL' started by KellerDev, Apr 12, 2017.

  1. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Unity WebGL seams to have a lot of issues with Touch Input. First of all, when I test it in the editor with an android device as a remote device, Input.touchsupported always returns false and I cannot really test it. After that, if I use a code which includes touch, if I place an Input.touchsupported check, it runs fine on the editor using the other inputs - mouse and keyboard. When I run it in a browser though, no input works.
    Anything I'm missing with WebGL and TouchInputs?
    if (Input.touchsupported && Input.GetTouch(0).phase == TouchPhase.Begin) {
    }
    The above code works in Editor ( It doesn't work with touch but it doesn't break the other inputs too), but it doesn't work in the build - it breaks all input.
     
  2. KellerDev

    KellerDev

    Joined:
    Feb 7, 2017
    Posts:
    59
    Are these common WebGL issues, or am I doing something wrong? The way it behaves now, it's impossible to use touch input for webgl with Unity. Has anyone managed to make use of it?
     
    Last edited: Apr 12, 2017
  3. berk_can

    berk_can

    Joined:
    Feb 8, 2016
    Posts:
    15
    I cant use it on 2019.3.13 either, so sad