Author Topic: NGUI 3.7.6 Unity 4.6.3f1 --- iOS Screen Rotation bug?  (Read 4002 times)

NeatWolf

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
NGUI 3.7.6 Unity 4.6.3f1 --- iOS Screen Rotation bug?
« on: March 25, 2015, 01:25:32 PM »
Hi,

I'm developing a game using NGUI 3.7.6 on Unity 4.6.3f1 and I'm experiencing a weird bug.

My match3-like game supports auto rotation and checks the device rotation to force a rotation if changed.

Everything works fine on the Web, PC, Android ports of the game.

When I export to iOS weird things happen:
Some bars do not reposition (the pink bars are child of the anchored blue bars).

Most important of all, when the game goes in Landscape mode the tiles in the game react strangely like  the input is rotated 90° in space. For example if I try to drag a piece down, it slides to the right instead. It also doesn't pick the actual tile my finger is under.

My UIRoot is set to be Constrained, 720x720 Width and Height Fit.

Each of the tile is actually a UITexture with a collider which triggers ondrag events to determine the direction of the move

I have really NO idea of what's going on but it only happens on iOS. I believe it's something related to NGUI.

As reference I'm attaching the desired result (that I have on all platforms but iOS) and the result on iOS.

Could you please help me sort this issue?

Thank you!


« Last Edit: March 25, 2015, 02:02:25 PM by NeatWolf »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.7.6 Unity 4.6.3f1 --- iOS Screen Rotation bug?
« Reply #1 on: March 27, 2015, 10:44:09 PM »
Wasn't this a bug in Unity itself that got fixed in some later patch?

NeatWolf

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: NGUI 3.7.6 Unity 4.6.3f1 --- iOS Screen Rotation bug?
« Reply #2 on: March 28, 2015, 03:26:39 PM »
Wasn't this a bug in Unity itself that got fixed in some later patch?

4.6.3f1 *is* latest patch.

I anchored everything and seems to go better, at least visually also on iOS (but still can't explain the different behaviour)

Anyway, and only on iOS, the NGUI controls are sometimes offsetted from their actual location.

I'm already doing a UIPanel.Refresh on the UI Root gameobject. Is there something else I can do to enforce positioning?

Why is it different on iOS?
« Last Edit: March 28, 2015, 03:50:32 PM by NeatWolf »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.7.6 Unity 4.6.3f1 --- iOS Screen Rotation bug?
« Reply #3 on: March 30, 2015, 01:51:53 AM »
You can broadcast "UpdateAnchors" to have them update immediately.