I've got a GameComponent that's using a MeshFilter, with a dynamically created mesh, and a MeshRenderer.
As soon as the origin of the object goes off-screen, the mesh stops being rendered both in the game and scene editor views. I'm assuming this is because the bounding box of the object isn't being updated to match the mesh once it gets created.
I've called `createdMesh.RecalculateBounds()`, and I've also tried setting it manually, but neither work.
Do I have to set these bounds elsewhere, like on the filter itself, or the renderer, or am I going wrong somewhere else?
Turns out mesh.RecalculateBounds()does NOT affect renderer.bounds it just always stays at zero. So anyone have a clue what's going on lol. Edit: Nevermind it does work. But only if called after the mesh is set in the mesh filter. So it's; GetComponent(MeshFilter).mesh = mesh; THEN; mesh.RecalculateBounds();
– Codster