UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionscene issue Emptyscene issue

more_horiz
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...

descriptionscene issue EmptyRe: scene issue

more_horiz
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),

privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply