Reputation: 996
Example:
I have two folders in my Unity3d project. In first I have Shop_Android.prefab, in second Shop_Ios.prefab.
Can I customize my builds for iOs and Android where be only first or second folder. Without delete and restore folders?
Upvotes: 1
Views: 417
Reputation: 253
All Resources are always included on your game build. So, you can write your own custom builder, which will move some assets to another directory, build game and then move it back. As far as I know, it is the simpliest way to solve your problem (even though it sounds like overkill :D )
It will be smth like this (it is just a pseudo-code! read about these commands in Unity manual):
AssetDatabase.MoveAsset("Assets/Resources/YOUR_ASSET", "Assets/YOUR_ASSET"));
BuildPipeline.BuildPlayer(...); //create a build of your project.
AssetDatabase.MoveAsset("Assets/YOUR_ASSET", "Assets/Resources/YOUR_ASSET"));
AssetDatabase.Refresh();
In additon, I red somewhere, that any GameObject tagged with "EditorOnly" will not be included in game build. I am not sure, if it will solve your problem, but you can try.
Upvotes: 1