- Home /
HDRP - Texture property on Render Probe is always null.
Hi,
When I try to access the texture property on my Render Probes, it always returns empty/null.
ReflectionProbe[] reflProbes = FindObjectsOfType<ReflectionProbe>();
foreach (ReflectionProbe probe in reflProbes)
Debug.Log("- Probe '" + probe.name + "': '" + probe.texture + "'");
This wil return: - Probe 'Probe_A': ''
My project is using the High Definition Render Pipeline. The weird thing is that the Universal Render Pipeline or the Built-In one is not giving this issue. I'm also very sure that there should be a cubemap texture on the probe, because I can see it in the Scene View.
Does anyone know if this is a bug or intentional?
Answer by elegize · Apr 29, 2021 at 09:24 AM
Apparently this is intentional. The HD render pipeline doesn't use the standard render probe data. Instead it has a "HD Additional Reflection Data" component which controls all the probe's settings. So in my case, add a reference to the additional script:
using UnityEngine.Rendering.HighDefinition;
And then instead of using the "ReflectionProbe" use the additional component:
HDAdditionalReflectionData[] reflProbes = FindObjectsOfType<HDAdditionalReflectionData>();
foreach (HDAdditionalReflectionData probe in reflProbes)
Debug.Log("- Probe '" + probe.name + "': '" + probe.texture + "'");
Your answer
Follow this Question
Related Questions
Extend screen space reflections in hdrp 0 Answers
Outdoor Reflection Probes 0 Answers
What is the best practice for using multiple reflection probes 0 Answers
How to change default filter mode of cubemaps generated from reflection probes? 0 Answers
How to rotate an HDRI sky through a script in the HD render pipeline? 1 Answer