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. Dismiss Notice

Bug Game freezes on multi-touch in WebGL builds

Discussion in 'WebGL' started by gosoon, Aug 28, 2023.

  1. gosoon

    gosoon

    Joined:
    Jun 9, 2023
    Posts:
    9
    hello. I'm making a Unity WebGL game for mobile devices.

    I found a problem while testing the game. When playing a game on a low-end tablet or other device, if you touch the game with multiple fingers in a short period of time, the game will gradually slow down and eventually stop.

    I had no issues with quick single-finger touches. When I tapped the screen quickly with five fingers, the game slowed down and eventually stopped.

    If anyone has had a similar experience or knows a solution, please help.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,048
    Probably depends on your input handling code, you may want to post that.

    I can easily imagine things that bring down an app to a crawl, such as flawed logic that instantiates objects for each finger every update or something like that and for some reason, it will only happen when there are two or more touches possibly because touches and lifts aren't tracked per finger.

    Again, without the code, we can only make wild guesses.
     
  3. gosoon

    gosoon

    Joined:
    Jun 9, 2023
    Posts:
    9
    To see if there is a problem with my code, I tested it by putting a single GameObject in an empty scene that simply plays animations, but it still lags when multi-touching.
    This doesn't seem like a problem with my code.

    Added: It doesn't matter how fast you touch. The problem comes when you touch with as many fingers as possible. When I tap the screen with all ten fingers, the game slows down, and as soon as I stop tapping, the game speed returns to normal.
     
    Last edited: Aug 29, 2023
  4. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    That sounds like a bug! could you open a bug report for us to investigate?
     
  5. gosoon

    gosoon

    Joined:
    Jun 9, 2023
    Posts:
    9
    I tried to file a bug report, but this bug only happens when I build the project with WebGL and run it on a tablet. Also, it doesn't seem to log anything because it doesn't crash. It just slows down the game.

    What should I do to get you to check this bug?

    What I have to say is that in a 2D game made with WebGL, repeatedly tapping the screen with ten fingers at the same time slowed down the game tremendously.

    (I'm sorry for my poor English skills)
     
  6. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    @gosoon when you say you tried to file the bug report, does that mean a bug report was created? did you get a case number? (looks like IN-XXXX) ?
     
  7. gosoon

    gosoon

    Joined:
    Jun 9, 2023
    Posts:
    9
    Yes, my case number is IN-53364.

    I seem to have the same problem not only in my WebGL builds but also in games made by other people, so I'd like to be able to get some information to resolve this.

    Since this bug does not occur on my high-end devices and only occurs on low-end tablets, I am not sure if it will be possible to check for the bug smoothly. If you need more information I will share.



    Thanks for your help.
    (I'm not good at English so I used a translator, sorry!)