Our Unity game is now available on a few different platforms:
iOS
Android (multiple “variants”)
WebGL
WebPlayer
The code seems to be the easiest point - using #ifdef directives we usually get by having different code paths for different platforms.
What i feel Unity falls short in, is being able to define multiple “configurations” with regards to scenes, prefabs, game objects, assets, where each one is used for the target platform.
Also, there’s no way of disabling / enabling different things per platform (for example - a plugin that is relevant only for a single platform, or a bunch of code files that should not be used).
I’d like to know, how are you managing your project for multiple platforms ? It would be great to hear about your experiences in the following areas:
Agree with the shortcomings. I would also classify “Editor” as a platform, we often have components and scripts that aren’t necessarily in the “Editor” directory (because they have scene presence) but we only use them in the editor context, and would like to remove the classes and objects from the builds.
It’s not exactly the solution you describe as you can’t say this particular gameObject is for this configuration etc…
But take a look at our tool ‘Advanced Builder’. It has some nice features, such as defining multiple configurations and use of custom defines (#if xx) per configuration (and much more!).