- Home /
No performance boost on culling when using "CameraFacingBillboard"-script
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
Answer by DaveA · Nov 12, 2011 at 01:59 AM
You could see when they show/hide and enable/disable accordingly: http://unity3d.com/support/documentation/ScriptReference/Renderer-isVisible.html
Thanks for the reply. Sorry I am not much of a coder. Do you think you could make this more clear to me how and where to apply this line?
Your answer
![](https://koobas.hobune.stream/wayback/20220613041332im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Sprite shape culling performance 1 Answer
Low performance issue due to culling. How to turn it off? 1 Answer
Tree Billboards 1 Answer
Occlusion culling and mesh combining possible and working? 0 Answers
Unity Terrain Performance 2 Answers