I have a mesh, with a lot of triangles, and expensive material information, and I am needing to hide the render of it. Since it is so expensive of an asset the act of loading it back into the memory cause a frame hiccup.
Is there a way to force a mesh and all of it’s assets to remain loaded in memory , while being able to “turn it off”?
Disabling the MeshRenderer will stop the mesh from displaying. Everything else will still be the same.
public void Hide()
{
renderer.enabled = false;
}
That will unload it from memory (both host and GPU) that is what is causing my issue. I need to have it not visible, but still fully loaded, avoid unity.
Put it on a layer that isn’t rendered by the camera. Note that this will cause it to still incur culling costs etc.