I set up some occlusion culling + default frustum culling. In a test area I have 3000 billboards/sprites. Once I attach the “CameraFacingBillboard”-script (in C#) the fps-count is still very low (around 5 fps) when I pan the view although all the billboards got culled and none is visible.
Therefore it appears they are still turning towards the camera even though they got culled. Is there a way to disable the script once they are culled? Or any other technique to achieve better results?
Here is the script:
using UnityEngine;
using System.Collections;
public class CameraFacingBillboard : MonoBehaviour
{
public Camera m_Camera;
void Update()
{
transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.back,
m_Camera.transform.rotation * Vector3.up);
}
}
Thx