What is Resolution Magic?Resolution Magic 2D is a Unity asset that adds automatic screen resolution matching to your game. Simply install the asset and add a prefab to your scene and it will automatically work to ensure your game looks great on any device, regardless of screen resolution or ratio.
Get the assetResolution Magic 2D will save you tons of work to cater your game to all the different screen sizes and shapes that Unity games support.
- Automatically fits your chosen content to any screen ratio or resolution
- All features can be used without scripting
- Drag-and-drop the prefabs for out-of-the-box functionality
- Customise behaviour and settings via inspector fields.
- All features are fully documented (you can download the documentation below and get details of every feature and how to use the asset).
- All code is included and fully commented (C#).
- Simple UI system lets you position UI elements on screen edges and corners, and they stay in their place on any screen.
- No interference with or from other assets and Unity features
- Resolution Magic does all its work at the start of a scene. It only affects the 2D camera’s initial position and scale.
A DemonstrationWith so many devices out there it’s difficult to make your game work well on all possible screens. Here are some screens showing how Resolution Magic solves that problem.
ScenarioImagine this sports game played by aliens from the planet Kenney:
The scene inside the Unity editor
IMPORTANTI want the green court area to fill up as much screen space as possible. Anything in the yellow area is filler that I only want my player to see if their screen is not the same shape as the green court.
Without Resolution MagicI designed this game with a 16:9 ratio, and here’s what it looks like on a 16:9 device:
A perfect view of whatever sport those critters are player on 16:9 screens (regardless of pixel resolution). But what about the players who don’t have 16:9 screens?
3:2 (iPhone and iPad devices):
Oh no! The goalies have fallen off the screen because it’s not as wide as the game design!
16:10 (Windows Phone / Android)
Not as bad as the 3:2, but the edges are still cut off. The game might be playable, but you can’t publish it to an app store in that state!Unity leaves your content alone, not adapting to the screen it’s on. It’s not good enough!
With Resolution Magic 2DHere are images from the same scene with Resolution Magic 2D enabled. Remember, I told Resolution Magic to make the green area fill as much screen as possible and to show anything in the yellow area only if the screen is a different shape (aspect ratio) to the green court.
Since the game was designed for 16:9 this image looks identical to the one without Resolution Magic.
There’s the magic. Resolution Magic makes sure the entire court area stays on the screen (with some of the crowd in the yellow area visible in the ‘dead space’ created by using a different aspect ratio to what you designed). Your player sees everything they should! Like magic.
Fit to backgroundResolution Magic 2D also lets you set a second, larger area of interest so you can further adapt your game. In the following screenshot I have told Resolution Magic to show the entire game area instead of just the court:
The scaling still works, but now you have a view that gives users with larger, higher-resolution screens a more interesting scene, while you can still focus on the court for smaller devices where every pixel matters.