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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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;