Been wondering what the difference is between frustrum culling which I believe is automatic in Unity and enabling/disabling a renderer using OnBecameVisible/OnBecameInvisible. Don’t they do the same thing and if so, why would you use OnBecameVisible/OnBecameInvisible?
3 Answers
3For instance to activate/deactivate certain scripts or turn on/off emitters. Even if something is off screen and isn’t rendered it’s still computed as a gameobject and costs differently depending on certain components.
Thanks. I thought it might be something like that but the docs seem to indicate it was used for renderers. Would the calls be placed in Update() or FixedUpdate()? For a good many objects, is the overhead worth it I wonder?
Thanks. I thought it might be something like that but the docs seem to indicate it was used for renderers. Would the calls be placed in Update() or FixedUpdate()? For a good many objects, is the overhead worth it I wonder?
Don't post comments as answers please. Rather comment on the person's answer using the 'Add new comment' button.
– Meltdown