ShadowCasterGroup2DManager.cs 957 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace UnityEngine.Experimental.Rendering.Universal
  5. {
  6. internal class ShadowCasterGroup2DManager
  7. {
  8. static List<ShadowCasterGroup2D> s_ShadowCasterGroups = null;
  9. public static List<ShadowCasterGroup2D> shadowCasterGroups { get { return s_ShadowCasterGroups; } }
  10. public static void AddGroup(ShadowCasterGroup2D group)
  11. {
  12. if (group == null)
  13. return;
  14. if (s_ShadowCasterGroups == null)
  15. s_ShadowCasterGroups = new List<ShadowCasterGroup2D>();
  16. LightUtility.AddShadowCasterGroupToList(group, s_ShadowCasterGroups);
  17. }
  18. public static void RemoveGroup(ShadowCasterGroup2D group)
  19. {
  20. if (group != null && s_ShadowCasterGroups != null)
  21. LightUtility.RemoveShadowCasterGroupFromList(group, s_ShadowCasterGroups);
  22. }
  23. }
  24. }