Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when exporting in HDRP and no Materials #62

Open
steoberg opened this issue Oct 11, 2022 · 1 comment
Open

Exception when exporting in HDRP and no Materials #62

steoberg opened this issue Oct 11, 2022 · 1 comment

Comments

@steoberg
Copy link

Hi there,

I try to export a gameobject in HDRP at runtime. First I got an exception in MaterialExtensionsConfig line 125. "profiles" was null. This happend also in the "ExportTestScene".
For some reason this doesn't happen anymore but in any case, the materials are all white.
The asset contains some custom shaders (Shader Graph) but mostly HDRP/Lit shaders. Both are white after exporting.

The validation report on gltf viewer shows two messages "UNUSED_MESH_TANGENT" and "UNSUED_OBJECT", both many times.

I'm using Unity 2022.2.0a17.

Any ideas? Thanks!

@hybridherbst
Copy link

Hi, does the same happen on Unity 2021.3 LTS in HDRP?
Do you have a simple scene for reproduction?

The validation messages are expected, the validator complains that these are "unused" since the materials using those meshes don't need them, but UnityGltf can't know if you want to retain the data nonetheless for other softwares. Stripping them out would mean when you switch the material in an external software you're now missing the mesh data.

If you want "clean" validated files please use pipeline processing tools such as gltf-transform to prune unneeded data for delivery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants