Managing a project for multiple platforms

Hi,

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:

  • Code management
  • Asset management
  • VCS workflow (branching, etc)

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.

1 Like

We used strange ioc with dependency injectiont o handle multi-platformity :slight_smile: not exactly the answer to your question , but still :slight_smile:

Hey there!

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!).

@PygmyMonkey Thanks, i believe we looked at it in the past but eventually didn’t buy it. Perhaps we will take another look

1 Like