1
NGUI 3 Support / Re: Buttons become unresponsive when programmatically changing screen orientation
« on: July 02, 2014, 05:11:03 PM »
FYI a workaround for me is to toggle between this two modes:
and
That moves between freezing the orientation, and setting back to auto. That may not work for everyone. My particular use-case simply requires temporarily disabling auto-rotation while my gyro mode is active. I don't care if it's in portrait or landscape when that happens. Then I restore it to auto when my gyro mode is deactivated.
Whatever is wrong with Unity's orientation changing logic, moving between these two modes doesn't cause errant behavior at least.
- Screen.orientation = Screen.orientation;
- Screen.orientation = ScreenOrientation.AutoRotation;
That moves between freezing the orientation, and setting back to auto. That may not work for everyone. My particular use-case simply requires temporarily disabling auto-rotation while my gyro mode is active. I don't care if it's in portrait or landscape when that happens. Then I restore it to auto when my gyro mode is deactivated.
Whatever is wrong with Unity's orientation changing logic, moving between these two modes doesn't cause errant behavior at least.
