That is exactly what I’m doing, just call it when entering a new tile.
I’ve found out that this isn’t the cause of my framedrop though, it’s related to my FoW solution for meshes.
So what I have is a transparent gray plains mesh that overlays the basic terrain. No problems with that.
But for all my meshes attached to a HISM parent, I have a HISM_FoW variant. The FoW variant uses the same mesh, but with a transparent material assigned to it.
Whenever I reveal new terrain, I remove transforms from the HISM_FoW and add one to the HISM(_revealed) parent.
This seems to be giving quite a few hickups, as I’m always looping each HISM to find the correct transforms to remove.
I wanted to use the getInstancesOverlappingSphere function to find overlapping indexes instead, theoretically quicker, but for some reason this function simply seems to not work at all.
So yeah, that’s my problem I’ll tinker with it more this evening after work.
Nice progress with the invisible roofs btw!