Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ThatRobVK · Feb 20 at 03:02 PM · shadersassets

Shader not loading on addressable

I'm moving my addressable objects to a separate project and have hit a snag with loading custom shaders.

I load a custom ScriptableObject which has a Material on it, which in turn has a custom shader assigned. This worked fine when the SO was addressable on the main project, but it's not loading the shader when the addressables are built in another project. The SO and Mat load fine and show in the hierarchy, but the shader goes to the error shader:

alt text

Both projects have the shader set to always load, here are their Graphics Settings side-by-side:

alt text

I saw a similar question here but I don't use AssetBundle.UnloadAll or anything like that. And building this SO/Mat/Shader into a bundle in the game project loads it fine.

Both the game and the assets projects are Unity 2020.3.25.f1 and use Addressables 1.18.19

Help appreciated!

errorshader.png (3.5 kB)
graphicssettings.png (181.2 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ThatRobVK · Feb 20 at 03:28 PM

OK I somehow managed to fix it, but the fix doesn't make sense to me, so still keen to figure out what is going on. Here are the steps I took and now it's loading both this shader and another shader correctly:

  1. Make the shader itself addressable and put it in a separate addressables group

  2. Rebuild addressables in the asset project

  3. Rebuild addressables in the game project

  4. Shader now loaded fine

  5. Remove shader from addressables

  6. Rebuild addressables in the asset project

  7. Shader still loads fine

  8. Add another material that requires a different custom shader in the asset project, rebuild addressables

  9. Both shaders now load fine

So this makes no sense to me. Questions still in my head:

  1. Adding the shader explicitly as an addressable item didn't seem to do anything as it still loaded after I rebuilt addressables - correct?

  2. If it was rebuilding addressables on the game project that resolved it, then why did the second shader load fine without that rebuild? Also addressables on the game project isn't set to any of the paths the assets project builds to so they shouldn't have anything to do with one another anyway?

  3. Why did the second shader load fine without being included in the always load shaders section of the Graphics Settings?

So it works, it's "fixed" but I don't actually understand which part of that fixed it and why, any comments appreciated to try to figure out so that people have a deterministic fix for this type of issue.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

158 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Built in shaders not available in unity 3.3 2 Answers

How to modify the Default-Material ? 1 Answer

Error when importing certain assets packs (like water(pro)) 0 Answers

Converting c# function to shader. 0 Answers

downloading assets 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges