- Home /
Reflection Probe setting customBakedTexture as instance?
Hey,
I am trying to set the customBakedTexture of a reflection probe from my editor script. I get the Reflection Probe by using FindWithTag("tagname") to get the GameObject and then using GetComponent() on that GameObject. I then try to set the customBakedTexture which appears to work when looking at it with Debug.Log(probe.customBakedTexture); but when I click on the object in scene it still shows the old cubemap.
In the Unity Docs it shows that the customBakedTexture is supposed to be a reference but it seems like it is setting it as an instance.
https://docs.unity3d.com/ScriptReference/ReflectionProbe-customBakedTexture.html
Is there a fix for this besides making multiple GameObjects in scene and swapping between them?
Cheers,
Charlie
Your answer
Follow this Question
Related Questions
Easily reference class instance 1 Answer
missing (transform) vs none: how to code this or query for it? 1 Answer
Different reflection cubemaps for different materials? 0 Answers
Scriptable Objects, how to force Include in Compile / Build without referencing it in the scene? 1 Answer
The infamous: Object Reference not set to an instance of an object 1 Answer