Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
Member [Lv. 1]
Member [Lv. 1]
Posts : 3
Points : 1145
Rep : 0
Join date : 2015-06-09
View user profile

scene issue

on Wed Jun 17, 2015 1:12 am
Hi All,

I created empty scene, and created buttons through code by giving the coordinates. here when i running in unity buttons placing based on the coordinates. then i build  .apk file and run in mobile device, now buttons are not placing properly.

how can we scale the scene and fit to all mobile screens dynamically.

please help me...


thanks in advance...
Member [Lv. 2]
Member [Lv. 2]
Posts : 9
Points : 1242
Rep : 4
Join date : 2015-04-08
View user profile

Re: scene issue

on Wed Jul 22, 2015 4:05 pm
try replacing the cooordintes with screen.width and screen.height then use some division and other math to adjust it to fit how you want them for example

(GUI.Button (new Rect (screen.width / 2, screen.height / 2, 200, 30),

Back to top
Permissions in this forum:
You cannot reply to topics in this forum