using System.Collections; using System.Collections.Generic; using UnityEngine; namespace UnityEngine.Experimental.Rendering.Universal { public abstract class ShadowCasterGroup2D : MonoBehaviour { [SerializeField] internal int m_ShadowGroup = 0; List m_ShadowCasters; public List GetShadowCasters() { return m_ShadowCasters; } public int GetShadowGroup() { return m_ShadowGroup; } public void RegisterShadowCaster2D(ShadowCaster2D shadowCaster2D) { if (m_ShadowCasters == null) m_ShadowCasters = new List(); m_ShadowCasters.Add(shadowCaster2D); } public void UnregisterShadowCaster2D(ShadowCaster2D shadowCaster2D) { if (m_ShadowCasters != null) m_ShadowCasters.Remove(shadowCaster2D); } } }