Skip to main content
Search our knowledge base

Shaders are pink when loaded from an AssetBundle



  • Alexander Podzolko

    This didn't helped much. I've fullfilled all the requirements and my material from asset bundle still pink.

  • Viktoria Hwang

    Whoever makes it to here:
    Add the shaders your prefabs are using to that Always Include Shaders list in Project Settings --> Graphics. Rebuild your bundle assets and it should work.
    (Used in 2018.3.12f1)

  • Fábio Burkard

    @Viktoria Hwang That did the trick; thanks for helping!

  • Scott Foster

    I'm using bundles I build in one project (a) in another project (b) that acts as the player .    If I need to add a shader to the Always Included shader in project (a), do I also need to include it in project (b)?

  • Brian Paulus

    This article does not help, and how this happens needs to be nailed down better. I've gone through rebuilding the asset project from scratch twice, being careful to change just one thing each time, with no success. Suddenly after a Unity restart on the asset project and a rebuild, everything works. Change back the last setting I changed and restart Unity again, everything still works.

    We really need to nail down what settings need to be the same between main and asset projects. It's obvious that it's not just the "Always Included Shaders" list differences, platform differences, or graphic API differences that are discussed in the article.

  • Brian Paulus

    Ok, I finally nailed down that the Rendering Path in the Universal Renderer Data must match between the main and asset projects (obvious), AND AFTER CHANGING IT TO MATCH, YOU MUST RESTART UNITY FOR THE ASSET PROJECT FOR THE ADDRESSABLE BUILD SYSTEM TO PICK UP THE CHANGE FOR SOME REASON (not at all obvious).

    I spent hours arriving at this conclusion, because even after changing all graphics settings to match between projects, things still would not work without a Unity restart on the asset project side. I could change the setting and rebuild Addressables all day, flushing build caches along the way, and the content hash will not change without a Unity restart.

  • Alireza Tabasi

    Most people don't pay attention to their unity editor graphics API.
    As mentioned in the article. If you build for OpenGL your editor must load the shaders from bundle with OpenGL too. So make sure to uncheck auto graphics API for standalone and only check what you built for.


Article is closed for comments.