Completely disable gameobjects based on the camera’s frustum or distance
Increase your frames and performance using this tool that disables game objects completely when they’re not in view. Stop events, scripts, animations, sounds, basically any and all components on an object when not in view and re-enable on view, by disabling/enabling the object itself.
This package offers the option to disable gameobjects depending on distance also and not only the camera’s view.
This package works on all rendering pipelines (built in, URP and HDRP) but the demo is made using URP.
Unity performs Frustum Culling for static objects by default under Occlusion Culling, but you need a custom solution to completely disable the gameobject as Unity’s disables the mesh/skinned renderer only. This is where this tool comes in. Use it on CPU-intensive objects as the gameobject will be disabled in it’s entirety including all of it’s scripts and components when player isn’t looking and back on again when within the frustum. Don’t use it on your entire world.
Set the values of the 4 sides of the frustum to better suit your game if needed, or even enable distance culling which as expected puts distance into consideration.
This package comes with a project demo, a fully-commented source codes and documentation.