- Home /
Can I just scale my game for any resolution?
So, I'm having issues with resolution in my game. My game is a 2d game where the players need to see the entire scene at all times. If I change resolution, and please correct me if I am wrong, but it just changes the size of the main camera, meaning now the players see more than what I want them to see.
Is there a way where I can just scale everything that I want the players to see when they change resolutions instead of changing the size of the thing viewing it? I know that unity will basically do this if you try to set a resolution that is too high for someones monitor, it will scale everything down. So can I somehow make it so it will scale like this on my terms?
Thanks!
edit I don't have time today to code, but this is what I am going to try and let me know if there is anything wrong with this: Calling findobjectoftype at the start of my game with the type of gameobject. Throwing all of those into an array, and using For Each and multiplying their scale by the screen resolution ratio. Then any new objects coming into the scene after load, having them instantiate at that same ratio. Good plan? Bad plan? I'll give it a shot tomorrow.
Hey guys! I was being dumb! So... apparently it does scale everything by resolution and not just changing the camera size >.< I now understand the confusion haha! I'm going to go hide in a corner now.
Answer by Kirbyrawr · Sep 14, 2012 at 02:26 PM
If you want scale GUI , you need to do script like this:
if (Screen.width +1366 && Screen.height +768){
//do it
}
Hope it helps , in the script you can change these numbers to custom numbers for your screen or other biggers :3
I'm looking to scale everything the game renders. So not just the GUI, but all of the game objects and what not. I come from XNA and it basically does this for whatever device you put your game on by default, so I didn't even think about it until my game was essentially finished! eeek!
Thanks for the reply though.