title: Check if the object is off screen
body: <p>I need to know when an object has stopped seen by the camera to return it to the pool.
  I tried a couple things but not success, I want to remark the camera follow the player only in the X axis, it's 3D but it's a sidescroll view game. 
  Btw I'm not using MonoBehaviour so avoid suggest OnBecameInvisible and relatives.</p>
  
  <p>Here my two failed attempts.</p>
  
  <pre><code>internal static bool IsVisible(this Renderer renderer)
  {
      Plane[] planes = GeometryUtility.CalculateFrustumPlanes(Camera.main);
      return GeometryUtility.TestPlanesAABB(planes, renderer.bounds);
  }
  </code></pre>
  
  <hr>
  
  <pre><code>internal static void IsVisible(this GameObject go)
  {
      var screenPoint = Camera.main.WorldToScreenPoint(go.transform.position);
      screenPoint.x = Mathf.Clamp01(screenPoint.x);
  
      if (screenPoint.x &gt; .05f)
      {
          Debug.Log("Visible");
      }
      else Debug.Log("Invisible");
  }
  </code></pre>