- Home /
Device Auto-Rotation
Hi,
Is there any callback method in Unity to launch once the autorotation is triggered? I would like to insert some custom code to modify my GUI when the screen orientation is changed. Anyone have an idea of this trick please share with me.
Answer by YUHUA · May 24, 2012 at 05:40 AM
we always use relative coordinate in gui, Screen、PlayerSettings、deviceOrientation class may help you ~ ~
Thanks for advice but I'm using absolute GUI layout. It's just too costly for me to convert the entire UI system to relative coordinate. I know how to use deviceOrientation class to rotate the screen. What I'm looking for is to find a way to start an action once the screen is transfor$$anonymous$$g to a new orientation. Do you have an idea?
you can check deviceOrientation every frame or analysis Input.GetAccelerationEvent if you want to contol it, you can use Screen.orientation -0-
Your answer
Follow this Question
Related Questions
How to have my mobile device screen lighting on all the time 2 Answers
What is the update for iPhoneSettings.screenCanDarken 2 Answers
Detect Device Orientation Event 1 Answer
android platform 0 Answers
Android Build has issues 1 Answer