- Home /
Cannot change from code HDRI sky distortion.
Those two parameters doesn't want to set any float, and typecast wont work.
HDRP_sky.scrollOrientation.Override(?);
HDRP_sky.scrollSpeed.Override(?);
or
HDRP_sky.scrollOrientation.value = ?
HDRP_sky.scrollSpeed.value = ?
first variant was working solution before some unity update, and now its give error:
error CS1503: Argument 1: cannot convert from 'float' to 'UnityEngine.Rendering.HighDefinition.WindParameter.WindParamaterValue'
simple typecast also don't work. creating temporary variable of that type also cannot be done, because its impossible to set it from code.
Comment
Answer by Ava42 · Feb 06 at 05:56 PM
so assignment must looks like this:
WindParameter.WindParamaterValue value = new WindParameter.WindParamaterValue();
value.mode = WindParameter.WindOverrideMode.Custom;
value.customValue = 0.5f;//whatever
HDRP_sky.scrollOrientation.Override(value);
value.customValue = 15.0f;//whatever
HDRP_sky.scrollSpeed.Override(value);
Your answer
![](https://koobas.hobune.stream/wayback/20220613052609im_/https://answers.unity.com/themes/thub/images/avi.jpg)