OnBecameVisible is called when the renderer became visible by any camera.
// Enables the behaviour when it is visible function OnBecameVisible () { enabled = true; }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void OnBecameVisible() { enabled = true; } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def OnBecameVisible() as void: enabled = true