Hi,
I tried hard to figure out how to hide whole gameobjets with sprite renderer for performance reasons. Disabling only the sprite renderer does do nothing with performance. I need to disable the whole object that is not seen by the Main Camera and activate it again when seen.
My problem is that I have a cript using update method and check if the object is visible by
bool visible = GetComponent<Renderer>().isVisible;
but when the object is deactivated, Update is not called anymore so the object is never set active again when in the viewport…
The script has to be really simple. Sould not be using update because I have a 2D platformer and my scene is build up from hundreds of sprites. I need all sprites turn off when they are not visible.