Search Issue Tracker
By Design
Votes
0
Found in [Package]
6.9.1
Issue ID
1181660
Regression
No
[HDRP] Procedural Sky Volume value change has no effect when changing the value vie script
Steps to reproduce:
1. Create a new HDRP Project
2. Import user's attached package "HDRPVolumeBugReport"
3. Open "SampleScene" from user's package
4. In the Hierarchy select "Rendering Settings"
5. Expand "Procedural Sky"
6. Enter Play mode
7. Press "Space"
8. Notice Exposure value was not changed in the Inspector
9. Move the mouse out of Unity and go back to it
10. Notice the Exposure value was not changed
11. Notice that the Sky has not been changed according to the value
Expected results: Changing the Sky exposure value changes the Sky itself
Actual results: Changing the Sky exposure value via script has no effect on the Sky
Reproducible with: 2019.2.1f1(6.9.1), 2019.2.3f1(6.9.1)
Note: After changing the value via Script there will be no effect if the change is being made manually in the Editor
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [UIBuilder] Changes aren't detected on types implementing IList
- [HDRP] Text is rendered with artefacts when using STP and resolution scale is set a float value
- [Settings Search] Search results not matching search term correctly
- Crash on memcpy when opening a project that loads TSS files
- Multiple errors appear when compiling a ShaderGraph shader's code in a specific project
Resolution Note:
Hello, the problem is how you set the exposure value in the script you provided:
> sky.exposure = new FloatParameter(0, true);
this kind of assignation is not supported by the volume system in general. When the volume system is enabled, it caches the fields of all volumes so when you assign them, the reference to these fields are not the same as the cached ones so in the end they are not update.
The good way of updating volume parameters values is by using the .value attribute:
> sky.exposure.value = 0;