Different texture on a model in DEV and PROD builds

Hey, my fake shadow plane has a different texture in PROD build.

In unity and DEV build i have the correct visual:

But in PROD it chooses to use another texture from a “random” object. (Perhaps last compressed texture is reused? That’s my theory, lower i’ll show the log)

The white texture is a texture used for the grid, so it’s a texture which ends up in the build regardless. But it seems to be assigned to the shadow plane, where the shadow should be.


Original Post on Discord


Hey which version are you currently using?
Are you using the texture on a normal material (as in a plane mesh with your shadow material) or assigning the texture or material via a script?

normal material


happens both on toktx 4.0.0 and 4.1.0rc3

i see that you’ve made a update today, gonna update

Dont think it will change this bug tho.

Regarding the screenshot: skybox is only skipping toktx compression and when building for production we run some code that handles our extensions - I suspect there’s a bug that causes the texture for skybox to be inserted in a wrong array bucket :thinking: actually this is what’s currently in the process of being updated (and therefore completely re-written) but its not ready yet.

Can you try if it happens too if you JUST export the ground plane and your shadow plane?

If it still happens can you try exporting without a skybox? (and no lightmaps)

In a empty scene with just Skybox and my 2 planes the issue still occurs. Although, it seems to be compressing 4 textures where i would expect 3.

One of the textures is 4x4 white texture, i presume that’s something needle does and is not tied to any of my assets?

How do i export without skybox? Just removing the skybox material like so?

Yes, and make sure you have no baked lightmap (it could also be related to the issue)

you could also try making a prod build without this line of code in the needle engine package (at plugins/gltf-packer.mjs line 23)

It still happens without the skybox and i didn’t have any lightmaps in the first place as well

ok, gonna try that :+1:

Issue is still present.

and i commented it like so

Do you think you could send me the project? Your timing is good - my plan was to get the update of this gltf extension handling through this weekend so I could use the bug you have right now for testing too