Performance Question

I have a scene in which I swap out items on a character, once an item has been imported, is it better to toggle off the item vs. destroying the item, knowing that it might have to be reused again later on in the scene? Is there any performance penalty for toggling the mesh off vs. just destroying it?

Yes, it’s definitely better to toggle an object rather than dispose and recreate.

1 Like

The only caveat here is the amount of objects you have. Even when setting a mesh to disabled, the memory is still being consumed. It is 100% correct that it is much better, performance-wise, to disable-enable and not dispose and recreate, but if you are doing that with very large meshes, or with meshes with very large textures, it might be the right way to dispose unneeded meshes. It is very much use-case dependent.

1 Like