- Home /
How can i access all the GameObjects in the scene?
i wan to access them so i can change their position and scale for multi resolution.
how can i do that, also is there an easier way for multi resolution?
FindObjectsOfType(typeof(GameObject))
will give you all the objects in the scene. But I don't understand what that's got to do with multiresolution...
so i can scale the size of each gameobject depending on the resolution
thanks
If you're wanting to change the size of gameobjects so it adapts to different screens resolutions, it might be easier to just change the camera size to show more/less of your scene. As for UI you can change the scaling mode so it scales with width/height/aspect ratio.
Answer by rayfigs · Jul 27, 2016 at 05:02 PM
The best way to tackle this problem you'll need to narrow down your needs further, all assets,resolutions and aspect ratios are not created equally. Can you let us know what sort of assets, and platforms you are planning to build to?
If you're using sprites the solution would be different if you're using 3d objects. For example, if the scene is all 3d assets, modifying scale of your object wouldn't change the texture resolution and result in a bad quality textures and if you're looking to get higher fidelity graphics for 3d object a higher resolution could also be used in upping the resolution of your graphics for your platform.
Can you better clarify your use case?
my game is full 2D and i am using Unity UI objects (buttons, texts ...) and planning to release my game on all mobile devices and PC.
Thanks in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612085613im_/https://answers.unity.com/themes/thub/images/avi.jpg)