Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseIs this renderer visible in any camera? (Read Only)
if (renderer.isVisible) ProcessData.AndDoSomeComplexEffect();
no example available in C#
no example available in Boo
Note that object is considered visible when it needs to be rendered in the scene. It might not be actually visible by any camera, but still need to be rendered for shadows for example. Also, when running in the editor, the scene view cameras will also cause this value to be true.
See Also: OnBecameVisible, OnBecameInvisible.