Author Topic: My Big List of Anchor Complaints  (Read 11495 times)

notasynth

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: My Big List of Anchor Complaints
« Reply #15 on: October 28, 2016, 10:28:50 AM »
My biggest complaint is that the UI root boundary doesn't seem to match the shape and size of the game view or the camera.


If i have a sprite in the upper left of the UI root, and I add an anchor to it the sprite ends up -800 units outside the root for some reason, and i have to move it back to where its supposed to go.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: My Big List of Anchor Complaints
« Reply #16 on: October 30, 2016, 12:27:45 PM »
OSX, I'm guessing? Unity broke that ~2 versions back.

notasynth

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: My Big List of Anchor Complaints
« Reply #17 on: October 31, 2016, 09:48:06 AM »
Yeah, I'm using OS X.  My team has started to maintain multiple versions of unity, so i'll have to try an older one for now. Thanks.

In the future, our project will need to utilize the upcoming WebGL build improvements from unity. Is there a fix in the works so that I'd possibly be able to use an up to date unity client by then?

notasynth

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: My Big List of Anchor Complaints
« Reply #18 on: October 31, 2016, 12:57:45 PM »
OSX, I'm guessing? Unity broke that ~2 versions back.

I've gone through every version of unity back to 5.3.1 and I'm having the same issues with anchors. Looking back at my project, I first used NGUI in unity 5.3.5 and had no problems with anchors.

I have updated NGUI since then. I have 3.10.2

Normally, I'd just forgo using anchors and make a UI layout for each device. However, my project has a requirement to release a desktop build using WebGL for use within a browser window. For this I need to have basic anchors for the widgets in the corners and a nav bar that spans the top of the app. This bug is making it extremely frustrating to work with such a simple design. :L

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: My Big List of Anchor Complaints
« Reply #19 on: November 03, 2016, 08:09:07 AM »
That's because I had to disable that code on my end. The code in question is NGUITools.screenSize inside NGUITools.cs, line 1899. That entire section had to be disabled on OSX.

In short, Unity broke the ability to get the screen size when they made editor work with retina devices. The version of Unity that broke it is Unity 5.4.