Very simple, but very strange. I have a reflection probe set to update realtime via script. I have a script attached to the same object that updates the reflection probe every 5 seconds. The problem is, the code doesn’t seem to trigger the probe. I’m not sure what’s wrong. Here’s the code:
var r : ReflectionProbe;
var w : boolean;
function Awake() {
r = GetComponent(ReflectionProbe);
}
function FixedUpdate() {
WaitAndBake();
}
function WaitAndBake() {
if(!w) {
w = true;
r.RenderProbe();
yield WaitForSeconds(5);
w = false;
}
}
One of the inputs on the r.RenderProbe() function is a render texture, but it doesn’t seem like that should be necessary (It doesn’t give me any script errors for not having it there, and I don’t even know what a render texture IS…). Does it need one? If so, what IS a render texture? Is it the texture the probe replaces when it renders? If so, why doesn’t it give me an error when I don’t have one?
P.S. It’s really annoying when I want to figure something out with these but all I find is “how to use reflection probes” and “how to use reflection probes” and “how to use reflection probes” and “how to use reflection probes” … You get the idea. Somehow no one has ever had problems with these? I don’t believe it.