I am new to Unity. Now I am working for Android in Unity. I develop a game in Unity. I face problem in multi resolution in android. How to develop a single script which support for multi resolution.
Thanks
Varadharaj
I am new to Unity. Now I am working for Android in Unity. I develop a game in Unity. I face problem in multi resolution in android. How to develop a single script which support for multi resolution.
Thanks
Varadharaj
with a lot of Screen.height / width logic and positionings that are relative to borders and potentially relative in size → lots of work unless you tell yourself that you just have a min requirement of 800x480 which should go through fine as a 2.0, reasonably 2.1 android phone is required to get your app at all
Is your problem GUI related? What I do is that I always design GUI to be resolution independant. The way I do this(there might be other and/or better ways) is to give size my GUI elements based on percent of Screen.
Lets say I wanted a control panel at the top of my game/application I would make my rect:
Rect topPanel = new Rect(0, 0, Screen.width, Screen.height * 0.2f);
//You can also position elements like this
Rect centerRect = new Rect(Screen.width * 0.25f, Screen.height * 0.25f, Screen.width * 0.5f, Screen.height * 0.5f);
I do not develop for Android on Unity atm so there might be other parameters I do not know of, but if it’s GUI related this is one way of doing it.