1. We've introduced thread tags, search within a thread and similar thread search. Read more here.
    Dismiss Notice
  2. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice
  3. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  4. We've released our first Timeline Experimental Preview, our new tool for creating cutscenes and more! To check it out click here.
    Dismiss Notice
  5. Unity 5.5 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  7. Unity 5.6 beta is now available for download.
    Dismiss Notice

Shaders in Asset Bundles do not load.

Discussion in 'Shaders' started by goal2112, Mar 17, 2017.

  1. goal2112


    May 8, 2013

    I've been using asset bundles for a project for quite a while, and now we need to update it so we figured we'd bring it up to Unity 5.5. Now asset bundles don't seem to be able to load their contained shaders anymore. When I try to load all Shader objects in the bundle I get the right number of objects, but they're all blank. Their name is an empty string and their isSupported flag is false. This effectively renders some of the other techniques mentioned about this problem unusable, like including these shaders in the "Always Included Shaders" list and retrieving them by name, since I don't know the name of the shader the material actually wants to use.

    These shaders work fine when I put the objects directly in the editor, and when I package the bundle I tried both StandaloneWindows64 and StandaloneWindows. Neither seems to work.

    The only other workaround I can think of is to encode the shader name in the material name, but given how many materials my bundles use this might require a special script that will run through all of the relevant objects to rename them, and I fear that raises the risk for other problems.

    Has anyone else experienced something like this recently?