Multiple Android platforms

Hi

(I have searched for this but am quite new to Unity - although an experienced console developer)

I’m prototyping a VR game on multiple platforms. The Google VR SDK requires a minimum API level of 24, whereas for GearVR it’s 19. Logically, they are different platforms, but from Unity’s point of view they’re both simply ‘Android’. I need to separate them somehow.

Does Unity have any mechanism for achieving this?

thanks

Unfortunately, there’s no built-in option to handle such cases. As you said - Unity considers both of these platforms to be the same.

The solution is that every company does its own thing.

For example, in our studio, we wanted to support 3 different “flavors” of our game for Android (the default version, another “reskinned” version with some updated behaviour and a version for the Amazon app store).

What we ended up doing was a system we called “Workspaces” - you tag different assets or folders to belong to a certain “workspace”. At an given point there’s only 1 active workspace, and you can switch between them from a menu item.

The way we kept the unneeded assets out of the project was by storing them outside of the Assets/ folder. When selecting a workspace, we would symlink the folder containing its assets into the Assets/ folder, for example:

Initial setup:

ProjectRoot
WorkspacesRoot/
|
| — AmazonVersion
| ---- …assets here…
| — More versions…
Assets

After selecting the “AmazonVersion” workspace:

ProjectRoot
WorkspacesRoot/
|
| — AmazonVersion
| ---- …assets here…
| — More versions…
Assets
|
| ---- AmazonVersion <— symlink to the above folder !

This system is not bulletproof and has its own little quirks, but it worked for us.

Hope this helps :slight_smile:

Thanks, that sounds workable, and useful also to have confirmation that I haven’t missed some built-in functionality.

1 Like