Skip to content

Unity 2023: Shader does not work in build mode. #63

Open
@TBartl

Description

I understand this repo isn't maintained or verified beyond 2021, but I figured I'd leave this here in case anyone else runs into this while trying to use a more modern version of unity.

Attempting to use these shaders in 2023.2.6f1 works in the editor, but fails during runtime: the shaders will appear pink.

After some debugging, I found this was because of the RenderPipeline tag defined:

  • It is currently defined as UniversalRenderPipeline
  • It should be UniversalPipeline

This one is really Unity's fault in the first place:
https://forum.unity.com/threads/renderpipeline-tag-changed.1468196/

Older versions of unity <2022 wouldn't actually respect this tag, and some of the documentation had it listed incorrectly.

For anyone looking for a quick workaround, you can create a "CustomToonShader" and edit the shader tags directly in the hlsl file generated from it.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions