You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the LevelLightMapData script, it tries to find the renderer based on the hash of the transform, gameobject name and hash. In Unity 2022.3.50f1, GetHashCode() on a mesh returns the instance ID. This value does not persist properly. This means that lightmap data is not applied to any of the meshes.
We've solved this locally by removing the mesh hash altogether, as we don't see much use for it. Perhaps changing it the hash of the mesh name would be a suitable alternative?
The text was updated successfully, but these errors were encountered:
Has similar problem here.
In my case, those meshes with static batching has been combine randomly, so it seems be impossible to compare with mesh hash in any way?
Hello,
I think you're right and the mesh name should be enough. I will change this later but in the meantime you can try version 2019.3.3 that doesn't rely on these. @Harrison-Chen if you're using static batching you cannot set light map scale and offset at runtime. The light map uv packing needs to be the same on your different scenarios and if that's the case just switching the light maps should be enough.
In the LevelLightMapData script, it tries to find the renderer based on the hash of the transform, gameobject name and hash. In Unity 2022.3.50f1, GetHashCode() on a mesh returns the instance ID. This value does not persist properly. This means that lightmap data is not applied to any of the meshes.
We've solved this locally by removing the mesh hash altogether, as we don't see much use for it. Perhaps changing it the hash of the mesh name would be a suitable alternative?
The text was updated successfully, but these errors were encountered: