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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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;