- Home /
How to select scene based on device screen size?
Hey everyone,
I have created multiple scenes of my game for different screen sizes. Maybe this is not the smartest solution but I found this way easier than playing with anchors. Anyway... is there a way to set which scene will be loaded while the game is loading? In Build Settings I can manually choose which scene will be first but is there maybe any way to run a script while first loading the game to select first scene based on the screen size?
I can probably create a generic first scene where I will run the script and set the game scene based on that but with the Unity loading screen in the beginning I was wondering if there is a way to do it during this.
Thank you!
Answer by Pangamini · Dec 13, 2021 at 11:37 AM
If you can, learn anchors and layout framework, it's very handy. If you can't, then yeah you have to use the default scene. If you want to utilize the splashscreen loading, then perhaps your first scene could contain all the different variants, and you'd just disable / delete those you reject. But again, I recommend you to learn the layouts
Thank you for your answer, I will definitely have more detailed look in anchors and layout framework in near future. It was just easier for now to solve it with multiple scenes.