- Home /
How would I access a HDRP asset via script (to modify shadow data)?
I've been looking through all the classes and structs in UnityEngine.Experimental.Rendering.HDPipeline
as well as the HDRP docs, but I can't find a solution anywhere. How would I change the resolution of my shadows as well as other things like hard/soft shadows etc. Or am I completely wrong and I should be looking at lights instead?
Answer by Seith · Jul 22, 2020 at 11:57 AM
@EternalClickbait Hi, you probably found the solution by now, but just in case anyone else needs this: if you want to access fields that are specific to HDRP on a light you need to go through the HDAdditionalLightData component.
So if you want to change the shadow dimmer field, you need to do:
myLight.GetComponent<HDAdditionalLightData>().shadowDimmer = 100f;
Hope this helps!
Your answer
![](https://koobas.hobune.stream/wayback/20220612202646im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The light is not blending 0 Answers
Light on shadows, shadows does not disappear 0 Answers
How can I fix my pitch black self-shadows? 1 Answer
Shadows and lights are flashing and disapperaring when player is moving 0 Answers
How to mkae lighting that fades to darkness in both directions of the y axis 0 Answers