Hi, are there any way for ignore certain Lens Flare in the camera.
For example, i have two cameras and i want one to ignore a certain Lens flare but without deleting or deactivating the Lens Flare component.
Thanks in advance.
EDIT:
I was trying with this: Post Render
But i’m unable to get it.
Well i got it, but it’s a bug of unity:
The depth of the camera is the solution.
The code is here:
var Object : GameObject;
var ObjectLayer : Behaviour;
var ObjectFlare : LensFlare;
//Is the time to wait for the render of the other camera.
yield WaitForSeconds (0.1);
//The layer is not seeing by mainCamera
Object.layer = Layer;
//We need to "update" the flare so we use this bug.
ObjectFlare.color = Color.black;
//We need to "update" the camera so we use this bug.
ObjectLayer.enabled = false;
//We need to revert the flare color so we use this bug.
ObjectLayer.color = Color.white;
//We need to enable again the flare layer of the main camera for seeing another flares except the ObjectFlare one. Is like working with layers.
ObjectLayer.enabled = true;
By the way unity needs a better system for flares etc…
The proof of that system:
Without the bug code:

With the bug Code:
