Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug: Button Press is occasionally consumed by hover state.

Discussion in 'Project Tiny' started by vincismurf, Dec 25, 2018.

  1. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    I have noticed that some times a button press via touch is firing the hover state and not pressed

    This is only noticeable on a mobile device not a PC

    http://afterschoolcartoons.com/Games/Tiny/Movement/bin/

    In my example the yellow color is the hover state red is pressed.


    Code (JavaScript):
    1. ut.UIControls.UIControlsService.addOnDownCallback(this.world, leftButton, function () { self.OnLeftDownPressed(); });
    2. ut.UIControls.UIControlsService.addOnUpCallback(this.world, leftButton, function () { self.OnSteeringReleased(); });
     
  2. TrashestCoder

    TrashestCoder

    Joined:
    Jan 27, 2017
    Posts:
    14
    Yup, started noticing this too. Even tiny arms revenge has this problem ( https://tiny-match3.storage.googleapis.com/index.html). If you head to mentioned game with your phone and start interacting with UI buttons, most of the time click doesn't react, but hover does. Would appreciate developers response on how to bypass this problem :)
     
  3. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    122
    Tiny Arms does not have this issue as it had a similar bug that was fixed. The demo running on the public google server is running off an old build of Tiny (0.13.0).

    It looks like UIControlService has a similar issue but we're looking into it. Just don't use UIControlService if you want to bypass the problem. Watchers/UIControlService have their weaknesses in stability because they were not officially tested and released as features.
     
    vincismurf likes this.
  4. TrashestCoder

    TrashestCoder

    Joined:
    Jan 27, 2017
    Posts:
    14
    Well it appears to be my own S***ty phone problem... Everything works on the second one I tested