public class NewBehaviourScript : MonoBehaviour
{
private void OnPreCull() {
Debug.Log("running");
}
}
console never outputs “running”
any ideas as to why? shouldn’t it output every frame?
public class NewBehaviourScript : MonoBehaviour
{
private void OnPreCull() {
Debug.Log("running");
}
}
console never outputs “running”
any ideas as to why? shouldn’t it output every frame?
seems on pre cull doesn’t at all work with either hdrp or urp, any alternatives?
You can add a Monobehaviour on a camera with something like this in it
[RequireComponent(typeof(Camera))]
[ExecuteInEditMode]
public class CameraMirror : MonoBehaviour
{
new Camera camera;
void Awake()
{
camera = GetComponent<Camera>();
RenderPipelineManager.beginCameraRendering += (context, camera) =>
{
onBeginCameraRender();
};
RenderPipelineManager.beginFrameRendering += (context, camera) =>
{
onBeginFrameRendering();
};
RenderPipelineManager.endCameraRendering += (context, camera) =>
{
onEndCameraRendering();
};
}
void onBeginCameraRender()
{
//add your code here
}
void onBeginFrameRendering()
{
//add your code here
}
void onEndCameraRendering()
{
//add your code here
}
}