- Home /
Best Practices for GUI Relative Positioning
What are the best practices for implementing a GUI and doing relative positioning?
Answer by demize2010 · Mar 30, 2011 at 01:00 PM
Use screen.height and screen.width ;)
So for example a progress bar that could be 0% or 100% of the whole screen width would be:
screen.width*0.55 - with the multiplier being your desired percentage. Here whichever co-ordinate of the gui object we are talking about would be positioned at 55% of the entire width of the screen.
http://unity3d.com/support/documentation/ScriptReference/Screen.html
Your answer
Follow this Question
Related Questions
Want to run unity game inside GUI of another application 2 Answers
GUI best pratices? 6 Answers
Button and resolution problem 1 Answer
Is it possible to move relative position of GUI? 0 Answers
How to give a relative position to a GUI Texture ? 2 Answers