Hi,
I have multiple cameras on my scene with different culling mask and different render depth.
My render GL scripts are attacked on objects (to show their forward direction/speed) not to camera.
Now, I want render the GL lines only on a specific camera with a specific layer mask not to all cameras in the scene.
Is possible to exlude GL renders from some cameras?
Solved!
Check the Camera tag
public void OnRenderObject ()
{
if (Camera.current.tag == “MainCamera”){
//rest of GL functions
}
}
or check the Camera name
public void OnRenderObject ()
{
if(Camera.current.name==“Camera1”){
//rest of GL functions
}
}
Thanks to maccabbe.
1 Like
It worked perfectly. Thank you and Maccabbe so much ^^