Hey everybody! Mugu here, wanted to talk about one of my latest experiences porting a game to OS X with Unity. So one of our last projects (I can’t say much for now) was porting a game made in Unity for Wii U to Apple’s Desktop platform: OS X. The idea behind this post isn’t to explain all the process but to point out the most important points to take in account when developing for OS X in Unity, based on my personal experience.
Resolutions: Remember that Unity doesn’t force resolutions that the OS doesn’t natively support. So if you make your game thinking in 16:9 (as its usual nowadays) you’ll probably suffer some headaches.
Xcode Project: Unlike building for iOS, with OS X builds Unity doesn’t generate an Xcode project. While some people think this is better, the reality is: it just gives you less control over your game and code.
GameKit and Unity: Let’s say you don’t want your game to use Game Center. Well, you’ll probably find one or two problems here, since when Unity builds and OS X project it always adds Game Center’s framework (GameKit) to your build, this can (and will) cause rejections when submitting the game to the store, since the review team will notice that your game doesn’t use Game Center but it’s included in your build. Supposedly, Unity 5 has some kind of control over this and it will check if your game uses GameKit in the build process, and if it isn’t being used it will not add it, but since in my case I had to use Unity 4.6 I can’t confirm this. There’s a interesting discussion on Unity’s forums regarding this issue with different approaches for solving it, you can check it out here.
JIT to AOT: As you may or may not know, C# uses JIT Compiler but Unity uses a different compiler for both OS X and iOS builds, since their native code is Objective-C and it uses an AOT compiler. We aren’t gonna discuss which is better for games in this post (if there’s such a thing…) but the fact is that, some code that could work on the editor may not work on a build for iOS and OS X because of the different compilers. If you want to know more about this, which I encourage you to do BEFORE coding or designing any solution for your game, check this awesome post.
Information and Tutorials: To be fair, there isn’t so much info or tutorials on the web regarding OS X builds for Unity. This is of course, because there aren’t so much games for OS X either. Take this in account because if you don’t know how to solve everything this will probably slow your development.
Code Signing: If you’re familiar with iOS signing, you probably know the basics here, but in my opinion signing an app for OS X it’s a little trickier. First: Xcode isn’t gonna sign it for you, you have to do it manually by console or using the awesome tool from Jemast Software, which I really encourage to try since it makes the things a lot easier, also Jeremie the author of the tool helped me in the process, he’s a really nice guy and has lots of knowledge in the matter.
I think I’ve covered the most important troubles that I faced, if you have any doubts or corrections just drop a comment below! Mugu.