URP build does not work

Update:
The problem is caused by the Matarial class.
It seems that, in the Editor, when adding a new Object (even from code), the system will automatically select Metarial as Sprite-lit-default (an original black layer of URP).
However, when deploying to the application when creating a new gameObject using the Metarial script file, it will not be automatically set to Sprite-lit-default.
So, I cloned the original Metarial from the URP packages, then pasted it into the Resources section. When creating a new gameobject, point to this Metarial.
As a result, the problem was resolved.
Thanks for watching.

Hi everybody,

I am building a URP (Universal Render Pipeline Asset) system for my project.

This works fine for me in the Editor, as shown below:

But when I build webGL, the window appears like this:

9638942--1370303--upload_2024-2-12_21-22-7.png

Have I configured something wrong, or haven’t selected any part yet? I use Unity 2023.

If anyone has the answer, or has encountered this situation, can you give me a solution?

Wish everyone have a good day.

Thanks !

Check logs, say which exact Unity version is used, is it just WebGL or all platforms, does the editor use the same quality tier as WebGL?

I used Unity v 2023.2.8f1, platforms I tested: window, WebGL
All are displayed as pictured. At the same time, I turned on dev mode and didn’t see any notifications on the screen.

Update: The editor appears as image (1) above my post. The remaining platforms are displayed as photo (2) above the article.

Okay, if a standalone Windows build has the same issue, its an issue with the build in general. Can you send a screenshot of the quality settings in Project settings?

Yes:
9638981--1370315--upload_2024-2-12_21-41-58.jpg
9638981--1370318--upload_2024-2-12_21-42-26.png9638981--1370324--upload_2024-2-12_21-42-47.png
9638981--1370321--upload_2024-2-12_21-42-39.png

Quality setting:


Delete all quality tiers except the one you need. You did not set an URP asset for all.
Does that help?

I found the cause:
The problem is caused by the Matarial class.
It seems that, in the Editor, when adding a new Object (even from code), the system will automatically select Metarial as Sprite-lit-default (an original black layer of URP).
However, when deploying to the application when creating a new gameObject using the Metarial script file, it will not be automatically set to Sprite-lit-default.
So, I cloned the original Metarial from the URP packages, then pasted it into the Resources section. When creating a new gameobject, point to this Metarial.
As a result, the problem was resolved.
Thanks for watching.

1 Like