Hey everyone, I ran into a strange problem today after updating to Unity 4.3.
I’ve been using a simple script to hide certain lights from a secondary camera using OnPreRender and OnPostRender:
function OnPreRender () {
var objects = GameObject.FindWithTag("InvisibleToGhostCamera");
objects.light.enabled = false;
}
function OnPostRender () {
var objects = GameObject.FindWithTag("InvisibleToGhostCamera");
objects.light.enabled = true;
}
This code was serving me perfectly well and did exactly what I expected it to, up until I updated to 4.3.
With the code unchanged, the lights I’m trying to hide simply stay visible. If I comment out the OnPostRender part, it quite happily turns the light off (for all cameras, of course).
Any ideas on what went wrong? Is it a bug, did something change, is there a better solution anyway? Any help would be greatly appreciated as this problem is really starting to irritate me. =P
I have the same problem - going to revert back to 4.2.2 until this is fixed :(
– MylesLambert