Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Renderer.isVisible

Switch to Manual
public var isVisible: bool;

Description

Is this renderer visible in any camera? (Read Only)

	if (renderer.isVisible)
		ProcessData.AndDoSomeComplexEffect();

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.