1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. 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
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. 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

Shaders in Asset Bundles do not load.

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

  1. goal2112

    goal2112

    Joined:
    May 8, 2013
    Posts:
    4
    Hi!

    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?