Issue with asset bundle when using Unlit shader

When I am loading a scene which has a gameobject(say a cube) with unlit shader from asset bundle, the shader doesn’t load. The cube is rendered in pink color.

These are the steps:

1 Create a new project(say project A)
2 In sample scene, create a cube. Add a new material. Change the material to Unit and color to Red
3. Created asset bundle of the scene using asset bundle browser.

4 Again create a new project(say project B)
5 Load the asset bundle.
6 The cube is rendering in pink color in unity editor.

But if I am following same process and create a apk and testing on phone, the cube is perfectly rendered in red color which I have assigned in the asset bundle.

Asset bundles are target-specific. iOS and Android bundles are not compatible with each other and they are not (generally) compatible with the editor either.

It’s annoying but for the editor you have to make PC-compatible asset bundles to load them there.

1 Like

Thanks @kurtdekker. After changing the bundle platform to Windows, it is working.

1 Like