"SOLVED" Mobile Black Bars And Responsive Location | Mobile Resolution

After extensive research on how to remove the black and gray bars on the sides of the screen on mobile devices across various screen resolutions, I have developed my own method and reached a conclusion. When you set the game resolution resize mode to adjust the height, your game shifts to the top. Conversely, when you set it to adjust the width, your game shifts to the right. Regardless of these configurations, your game will inevitably have black/gray bars. However, you can utilize assets to fill this blank space (positioning them accordingly at the top/left side of the screen).

If you opt not to use these settings, your game will be centered and constrained to its native screen size, resulting in black bars for different resolutions.

Facing this issue on my own game, i came out with a solution: Responsive Location. Please note that this method may be more suitable for specific types of games.

It involves establishing a base point or position that remains constant for all resolutions and then adjusting the position of every sprite accordingly by adding a certain number of pixels.

Please remember to use automatic resize for height/width. Personally, I prefer using height.

Example: Change the y position of “TextScore” to CameraCenterY() + 300.

With this action, my Text asset will consistently appear 300 pixels below the center of the screen. Since I have chosen “resize height,” I only need to concern myself with changing the y position. The x position will remain the same.

If anyone has another method or believes I might be overlooking something, please comment below.

My Game: Sugar Clicker: Christmas! | Play on gd.games