How can I implement a system similar to LOD but for objects?
For example - I have 3(4) prefabs:
1 - full with an animator and IK
2 - with an animator but without IK and the mesh itself with less detail
3 - baked animation
4 - turned off if it is outside the camera’s field of view
But how to switch them automatically relative to the camera’s visibility?
I tried using TestPlanesAABB and calculate distance, but it’s expensive considering that there are 100+ objects.
Assuming occlusion culling the Animator has settings to control how off-screen animations work (continue animating, stop and resume at current frame, stop altogether and restart). For “outside view” and distance checks you can use Culling Groups.
If I understand correctly, you are proposing the following - in the main object add one primitive object with a group of LODs and use it to determine the level of LODs and on this basis set the necessary prefabs?