Author Topic: UI Canvas  (Read 759 times)

c6burns

  • Newbie
  • *
  • Posts: 3
    • View Profile
UI Canvas
« on: November 22, 2017, 07:09:10 PM »
How are we supposed to create UI buttons that still work when downsampling? I'm using a screen space - camera canvas and IPointerUpHandler / IPointerDownHandler interface in conjunction with Image. That for sure doesn't work correctly.

Also, is Adaptive Downsampling supposed to work fluidly with a Canvas? I have scale with screen size enabled, and it changes the UI size completely. How should I be setting up the Canvas?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: UI Canvas
« Reply #1 on: November 23, 2017, 01:16:23 AM »
Hi!

Canvas UI elements should resize automatically based on the active downsampling factor. If it's not showing this behaviour this seems a bug.
Which Unity version are you using?


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: UI Canvas
« Reply #2 on: November 23, 2017, 02:29:33 AM »
Check out v2.2.9 from the beta board. It should fix the issue.

Regards.

c6burns

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: UI Canvas
« Reply #3 on: November 23, 2017, 09:09:38 AM »
Just tried 2.2.9. Issue remains, although I notice now billboard worldspace is default, which saves me clicking that each time :D

I'm using 2017.2.0f3, Canvas set to: screen space camera, and scale with screen size. The behaviour is actually really strange using adaptive. Sometimes the buttons will work as expected, and sometimes they won't. My menu works by setting various submenus, which are child objects, active and inactive. Can that be an issue? Quad downsampling seems consistently off. The bottom left corner is always correct, but the further from there I'm tapping the further off it is. Tested on real devices, not just in editor

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: UI Canvas
« Reply #4 on: November 23, 2017, 09:24:36 AM »
If Canvas elements show on the screen properly and it's the tap coordiantes which are wrong, then maybe there's something else unsync. Could you please send me a pm with a repro scene?
Thank you.

c6burns

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: UI Canvas
« Reply #5 on: November 23, 2017, 09:33:10 AM »
Sure thing, I'll make a new project to demo this and send it to you when I get a chance. Currently this is in a massive project so it needs to be split off.

It's thanksgiving today. Happy turkey day ;)

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4413
    • View Profile
Re: UI Canvas
« Reply #6 on: November 23, 2017, 09:59:23 AM »
Yep, thanks!