- Home /
So much problem with screen.width camera.pixelwidth and responsive design
I do not understand how to make the gameobjects responsive to the different screen size.
Here the platform is long finite and camera is set to perspective, how can i make this cube width responsive so that on the start of game the width adjust to the width of the phone screen.
Is there any way i can control the width, height, dimension of gameobjects with SCRIPTS !!! transform.localscale scales the width and behaves in a weird way.
i have tried using screen.width height and worldtoscreenpoint,screentoworldpoint but could not understood how to make this work.
Please help
Change your camera, not your gameobjects.
http://stackoverflow.com/questions/21369067/how-to-work-with-different-screen-resolutions
Hi @Landern thanks for the reply
can you please give a demo source code on how to achieve this. or just point to the useful documentation needed to get this done.
Your answer
![](https://koobas.hobune.stream/wayback/20220613161053im_/https://answers.unity.com/themes/thub/images/avi.jpg)