hi , please i developped a game using unity and i don’t have more ideas about how can i make a game that fits with all sizes of mobile for example hdpi xhdpi xxhdpi xxxhdpi
how can i make the UI and the game fits with all sizes
Did you use Unity’s UI system?
i don’t understand ?
Unity’s UI system.
If you use Unity’s UI system then you set the canvas to scale in the way you want it to behave and it scales according to the device’s screen.
Unity’s UI screen size handling isn’t like Android Studio where you do have a few screen sizes to choose from.
The easiest way is to just to set the Canvas Scaler to “Scale with Screen Size”. However this can make for some ridiculously large buttons on large screens.
So I’d recommend looking at the UI here: Learn game development w/ Unity | Courses & tutorials in game design, VR, AR, & Real-time 3D | Unity Learn
It is really interesting in the sense that there is no XML to control it (unlike Android Studio or stuff in Visual Studio such as Windows Forms/WPF). You can access it via C#, but most of your UI work will be done in the Editor.
And of course, the docs are very helpful: Redirecting to latest version of com.unity.ugui
thank you
ui it’s ok
and game how i can fits it with all size
You mean the game camera? That automatically resizes itself. You can check yourself by changing the resolution and aspect ration of the game view.