Hello.
Try this. I made this for Unity 2022.1.20f1 but I don’t see why it would work in other versions.
There’s 3 actions.
SetNoneCascades.cs turns off all shadows.
Set2Cascades.cs set the Quality settings to 2 cascades.
Set4Cascades set the Quality settings to 4 cascades.
When setting the amount for each of the cascades, use a value between 0 and 1.
For example, 0.1 is a value of 10%.
Kind regards
James.