12345678910111213141516171819202122232425262728293031 |
- 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<ShadowCaster2D> m_ShadowCasters;
- public List<ShadowCaster2D> GetShadowCasters() { return m_ShadowCasters; }
- public int GetShadowGroup() { return m_ShadowGroup; }
- public void RegisterShadowCaster2D(ShadowCaster2D shadowCaster2D)
- {
- if (m_ShadowCasters == null)
- m_ShadowCasters = new List<ShadowCaster2D>();
- m_ShadowCasters.Add(shadowCaster2D);
- }
- public void UnregisterShadowCaster2D(ShadowCaster2D shadowCaster2D)
- {
- if (m_ShadowCasters != null)
- m_ShadowCasters.Remove(shadowCaster2D);
- }
- }
- }
|