Have platform specific assets in streaming assets - I know Unity doesn’t currently support platform specific streaming assets directly - anyone have any clever ideas on how to implement this?
So I have
StreamingAssets/
---- Android/
---- iOS
When I build for the android platform I want to not include iOS, and vice versa.
My thoughts were an editor script which ties into the build system and moves the opposing folder out of assets or something - I haven’t done a ton of integration with the unity build pipeline though.
1 Like
I think what you’re looking for is something called “App Thinning”. It’s an extremely recent addition to the iOS platform by Apple and is only support on iOS 9.0 and greater. As far as I’m aware Unity does not have support for the XCode configuration required to perform App Thinning although you could probably set it up manually yourself. You can read more about the Apple support for it here:
https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
I have no idea if Google have any support for this kind of build/package optimisations.
The alternative solution is to use an object storage service like Amazon S3 and provide a “patching system” which can upgrade Assets in the game client at runtime and store them locally on the device. I’m working on a game backend which will have support for this feature very soon (we call it Asset Delivery). The service is called GameUp; if you’re interested I can send you an internal document I have for the design of the feature and you can let me know what you think.

We are currently implementing a solution that can achieve what you want.
Basically, we created a concept called “workspaces”. Each workspace is a specific configuration of our game (iOS, Android, Amazon, etc).
When switching between workspaces, we copy/remove folders from the project, so for each build we only get EXACTLY what we want, and nothing else.
We have a custom editor script that switches between these workspaces.
The actual implementation we used creates symlinks (a folder that is actually a pointer to another folder).
I could elaborate a bit more about our solution, but for your case, you can simply have an editor script that will move stuff in/out of StreamingAssets.