Forum Discussion

dhiran_karki's avatar
dhiran_karki
Explorer
2 months ago
Solved

Material Read-Only Issue & Shader Error (76 vs 66 keywords) Fix

Hey everyone
I ran into a recurring shader issue while working with Meta materials in Unity, especially when adding objects like a Cube from Meta Building Blocks.

The material was read-only, so I couldn’t change its shader manually. Because of that, I kept getting a shader keyword mismatch between
Meta/Lit and Universal Render Pipeline/Lit.

Here’s how I fixed it 

✅ I created a new material, then copied the material properties from the Meta material (so it had the same properties and color)
and pasted them into the new one.
Then, I assigned the new material as the parent in a Material Variant
by clicking the three dots next to the shader material and selecting “Create Variant for Renderer.”

Once I did that, the shader automatically switched to Universal Render Pipeline/Lit, and the error disappeared 

It worked perfectly, but I’m curious if this is considered a good practice or just a workaround?
Sharing this here in case someone else faces the same problem while working with Meta Building Blocks and URP.

Hope this helps someone!

  • dhiran_karki​ Thank you for sharing this fix! I'm going to quote it in this comment so we can mark it as a "solution" for future devs. I'll also share with our engineering team. 

    dhiran_karki​:
    I kept getting a shader keyword mismatch between
    Meta/Lit and Universal Render Pipeline/Lit.

    Here’s how I fixed it: 

    1. I created a new material
    2. Then copied the material properties from the Meta material (so it had the same properties and color)
    3. And pasted them (copied properties) into the new one
    4.Then, I assigned the new material as the parent in a Material Variant
    by clicking the three dots next to the shader material and selecting “Create Variant for Renderer.”

    Once I did that, the shader automatically switched to Universal Render Pipeline/Lit, and the error disappeared.

3 Replies

  • GoodGameGomez's avatar
    GoodGameGomez
    Community Manager

    dhiran_karki​ Thank you for sharing this fix! I'm going to quote it in this comment so we can mark it as a "solution" for future devs. I'll also share with our engineering team. 

    dhiran_karki​:
    I kept getting a shader keyword mismatch between
    Meta/Lit and Universal Render Pipeline/Lit.

    Here’s how I fixed it: 

    1. I created a new material
    2. Then copied the material properties from the Meta material (so it had the same properties and color)
    3. And pasted them (copied properties) into the new one
    4.Then, I assigned the new material as the parent in a Material Variant
    by clicking the three dots next to the shader material and selecting “Create Variant for Renderer.”

    Once I did that, the shader automatically switched to Universal Render Pipeline/Lit, and the error disappeared.

  • Rei2003's avatar
    Rei2003
    Honored Guest

    But there are too many materials in the meta folder do we have to copy this for each and every material? Also can you elaborate more about where you copied materials to cause there are one in the cache in packages, did you create them in assets or there

    • Rei2003's avatar
      Rei2003
      Honored Guest

      I figured it out, thanks for the soln!

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions