using UnityEngine; using UnityEngine.Rendering.Universal; public class ShadowUpdater : MonoBehaviour { public bool restrictSelfShadows = false; private void Start() { gameObject.AddComponent(); if (restrictSelfShadows) { ShadowCaster2D shadowCaster = GetComponent(); shadowCaster.selfShadows = false; } } }