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
- UI Builder can't set a background image to a sprite from a multi-sprite spritesheet in the Resources folder
- Light2D freeform does not render the internal part when rendered in certain shapes
- Using AddCopyPass causes an incorrect merging of passes.
- Negative Enum value is not pasted correctly when copying from another array
- Silent Crash when generating Lightmap UVs for a model with a large object scale
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;