- Home /
Unified cross-platform project?
I am interested in creating a single Unity project sized to various mobile platform resolutions. Ideally, I would like to be able to test/layout these scenes in the Windows Unity IDE without having to run Unity Remote.
When I saw the demos at GDC, it appeared that several developers had setup an environment to do just this, allowing them to choose a resolution from a drop-down list and test their game at that resolution. However, now that I bought Pro licenses for everything, the Unity sales staff tells me this is impossible and I cannot seem to find anything in the docs or forums that explain how this is done.
I have a Mac for building the final product and I am aware of Unity remote, but I am looking for a way to prevent fragmentation of my Unity projects. This is for a fairly simple 2D game using SM2/EZGUI and I don't need access to specific mobile functionality.
A cross-platform test/sample project that I could use as a starting point would be extremely helpful.
Blitzkrieg ('tanks in advance), Christopher
Answer by Brady · Apr 28, 2011 at 07:36 PM
There are some new features in SM2 and EZ GUI which make supporting other resolutions much easier. They are very new, so there aren't any demo projects yet which demonstrate them, but they are very easy to use. See the EZ GUI documentation under the "Advanced" section, and look for the EZScreenPlacement page. This component lets you position objects relative to the screen edges or center, regardless of resolution.
Another key thing to keep in mind is how the pixel-perfect setting of SM2 and EZ GUI work. Pixel-perfect will ensure that your sprite-based object is sized so that it always occupies the same number of pixels on-screen as comprise the sprite itself. So if you have an image that is 64x64 pixels, it will be resized in the game world as necessary to make it occupy 64x64 actual pixels on-screen, regardless of your resolution.
That can be useful if you want your UI or whatever to always display at its native pixel dimensions. However, it's usually not what you want for a game that will run at different resolutions since you usually want your game entities to be a fixed size to keep things simple. In which case, leave pixel-perfect disabled and they will always be the same proportionate size on-screen, regardless of resolution.
Same goes for GUI. If you want your buttons, etc, to always be sized so that they take up the same proportion of the screen area regardless of resolution, then leave pixel-perfect turned off. Instead, you can use the "Size Sprites" menu item to size them to the desired size at your desired target resolution. Then they will scale proportionately at other resolutions.
Those tips should take care of the vast majority of your resolution-agnostic issues.
Don't forget, there's an entire support forum just for these products as well, which is fully searchable, and if there's anything you can find by searching, we're always ready to answer any question you may have there. The forum is at:
Thanks!
While I appreciate your response, this doesn't really answer my question. I am speaking at more of a generic Unity level, not S$$anonymous$$ as far as how do I make a single project that runs on multiple platforms and that I can test under Windows in an iPhone sized window?
I will try your forums too, thanks for the tip on that though!
Your answer
![](https://koobas.hobune.stream/wayback/20220613125934im_/https://answers.unity.com/themes/thub/images/avi.jpg)