I’m using Unity 5.4 and I wish to enables disable, and choose none, hard or soft via scripting for a windows desktop build game. I was looking to other post with no results. I understand the documentation manual but I do not understand the Unity scripting section side. So also if you can explain how to read the scripting manual in this particular case, can help me.
QualitySettings or Light do not looks like have a shadow or shadow type. Finally there is this LightShadows but I do not know how to set it.
I try:
QualitySettings.shadows.None;
LightShadows.None;
Light.shadowTypes.None
Light.type
My code:
public enum ShadowsRenderType
{
none,
fastHard,
slowSoft
};
public class ShadowSettings : MonoBehaviour {
public Light sun;
public ShadowsRenderType shadowsRender;
void Awake ()
{
switch (shadowsRender)
{
case ShadowsRenderType.none:
//QualitySettings.shadows.None; ?
break;
case ShadowsRenderType.fastHard:
//LightShadows.Hard;
break;
case ShadowsRenderType.slowSoft:
//sun.LightShadows.Soft; ?
break;
default:
Debug.LogWarning("PROBLEM" + "\n do not exist");
break;
}
}