Search Unity

"No-go" areas

Discussion in 'UI Toolkit' started by James0oO, Mar 1, 2021.

  1. James0oO

    James0oO

    Joined:
    Dec 8, 2014
    Posts:
    15
    Hello all,

    Sorry but I cant find an easy answer to this. I am developing a game which requires a lot of icon dragging.

    Obviously I want to use as much screen as possible, but once you start dragging close to the edges you pull up system actions.
    Is there any list of what percentage of devices' screens are "no-go"?
    From my tests on phones; dragging an icon from 15% of the screen height still calls the top/bottom system.
    Do most devices use much the same? Or what's the worst case scenario?
    Is there a way to disable the system interaction if a game icon is grabbed?
    If not there is frustratingly only 70% of the screen which is usable.

    All the best

    James
     
  2. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243
    Are you sure these are "no-go" zones ?

    My guess is that you're encountering an UITK bug related to touch inputs.
    You might want to take a look at these :
    https://forum.unity.com/threads/ui-...ent-from-reference-ratio.995962/#post-6500118
    https://forum.unity.com/threads/uielements-touch-events.1003430/

    You can try the following to debug your issue :
    - Add the Device Simulator package to your project (if you don't already have it), so you can simulate the device
    - Test devices with different resolution and tweak your Panel Settings scale mode parameters
    This could help you identify the issue (the resolution, the aspect ratio, the panel settings...)


    EDIT : this has nothing to do at all with the author's issue :D
     
    Last edited: Mar 1, 2021
  3. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
  4. James0oO

    James0oO

    Joined:
    Dec 8, 2014
    Posts:
    15
    Thanks all.

    I didn't mean to imply there is anything "wrong" or misfunctioning. Obviously on a android phone, if you swipe from the top you wake the system menu. But this means you cannot drag an in game item down from near the top of the screen without also triggering the system menu.

    I just wondered if there was any way to prevent the system menu call when an in game item is dragged, otherwise I just have to avoid a large portion of the screen periphery. Taps and holds are fine, and dragging an item up into a high socket too, its just dragging away from the edges is a problem.

    Thanks again!



    Icons.jpg