I’m working on an app which contains a main game and several minigames as well. I’m trying to separate the mini games each into their own asset bundle and store them on our server. I’ve downloaded Unity’s AssetBundleManager plugin for this task.
Each minigame is it’s own scene and I’ve built the asset bundles by allowing the AssetBundleManager to automatically select the dependencies. I’m building for iOS and I’ve uploaded the bundles to a server. Once I’ve built the game for my device (iPad 2) I load the assets using a script very similar to what’s included in LoadScenes.cs. It seems to download the assets and open the scene just fine.
The problem is that I believe many of my shaders are broken at this point. The terrain in one scene is broken and the standard shader also seems to not work in some instances. I’m seeing a few parts where the mesh is invisible and other parts where the mesh is that pink colour you see when the material doesn’t have a texture.
In the editor, I’ve tried opening the same scenes after downloading from the server and although they were broken at first, I was able to fix them by simply adding the relevant shaders to my “always included shaders” and rebuilding the assets. When they didn’t work I was able to see the correct textures and shader name in the inspector window on an impacted model. When I reselected the shader, the model loaded fine.
I also should point out that everything works fine on my iPad 2 when I load these scenes normally and not from an asset bundle I am trying to get my build size down though.