Anatta336 / driven-decals

A mesh-based PBR decal system for Unity's universal render pipeline.
MIT License
580 stars 75 forks source link

Runtime generation fails on "Batching Static" meshes #4

Open Anatta336 opened 4 years ago

Anatta336 commented 4 years ago

To reproduce:

What happens: The generator fails to project any decals, giving a warning that target meshes aren't set to be readable. This warning is misleading; it appears even if the meshes created by the user are readable.

The problem appears to be that Unity's static batching replaces the original meshes with a combined mesh, which is not flagged to be readable.

What should happen: Ideally decal generation would succeed even in this case. If that's not feasible a more useful warning should be generated.

Grootloops33 commented 4 years ago

Is there a fix for this yet? I'm experiencing the same issue.

Edit: I found that if you manually enable the mesh's read/write in the import settings, it works. But like you said, the decal should still render. And this is not an option for in-engine generated meshes.

jinsw1081 commented 2 years ago

image it is not work rutime spawn decal error occur