Files
Crash-Course/Assets/ShadowUpdater.cs

17 lines
412 B
C#
Raw Permalink Normal View History

2025-04-20 22:23:34 -04:00
using UnityEngine;
using UnityEngine.Rendering.Universal;
public class ShadowUpdater : MonoBehaviour
{
public bool restrictSelfShadows = false;
private void Start()
{
gameObject.AddComponent<ShadowCaster2D>();
if (restrictSelfShadows)
{
ShadowCaster2D shadowCaster = GetComponent<ShadowCaster2D>();
shadowCaster.selfShadows = false;
}
}
}