-
Notifications
You must be signed in to change notification settings - Fork 87
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
Using copies of the default materials results in error log spam #344
Comments
I've noticed this again (while trying to create a clipping shader described in #248), so I'm guessing that whenever we do Maybe we can keep track of the variables that Cesium explicitly generates textures for, then only destroy those. It may also help to do texture pooling while we're at it. So instead of outright destroying those textures, we can return them to the pool, then resize / rewrite them for new textures. |
Hi, first off kudo's for the fantastic work - I am sure that many people are loving the Cesium maps, and the ability to bring them into their Unity projects. Having said that I would like to mention that this issue is indeed also bugging a few of our development teams, and it reduces the fun of troubleshooting issues by means of the log console. If a fix (or a workaround) is available we'll happily embrace it. Thanks in advance, greetings from Germany & keep up the great work! Peter Vrenken |
Hi @vrenken, Another user who was seeing the console spam said they fixed it by deleting the reference to “green1x1.png” in the “metalicRoughnessTexture” of the new material. Could you confirm if that works for you? |
I ran into the same error messages when duplicating the default material & shader (CesiumDefaultTilesetMaterial and ..Shader), and selecting 'None' as the 'metallicRoughnessTexture' stopped the error messages. Thanks for the workaround @j9liu ! |
Hi @j9liu, Thanks for the information @j9liu and @R-Stokke. We tested it in one of the projects. The trick that worked for us was:
We did not conduct any further investigation, but expect that something broke when we first changed the shader. Kind regards, Peter Vrenken |
I seem to have the same problem with Cesium 1.6.4 and Unity 2022.3.14f1. What I did:
I don't see any edit: |
Multiple users have tried creating their own copies of our shaders for their projects, only to get this error spammed in the console.
Using
Resources.Load
gives us an object that is linked to the asset itself, so we don't want to destroy a material returned by that function. But we alwaysInstantiate
that material, so one would think the material is safe to destroy.It's also hard to reliably reproduce this bug. I remember getting it to show up at one point on Unity 2021.3.14f, but I don't have concrete steps. I also haven't been able to reproduce it on Unity 2021.3.26f.
A user commented that they were able to get rid of the bug by "deleting the reference to “green1x1.png” in the “metalicRoughnessTexture”". So maybe we're incorrectly trying to destroy the texture reference?
Known forum posts: X, X
The text was updated successfully, but these errors were encountered: