Skip to main content
Search our knowledge base

Shaders are pink when loaded from an AssetBundle

Comments

7 comments

  • Alexander Podzolko

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

    2
  • 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)

    7
  • Fábio Burkard

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

    0
  • 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)?

    0
  • 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.

    0
  • 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.

    1
  • 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.

    0

Article is closed for comments.