BGRenderSetting.cs 563 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class BGRenderSetting : MonoBehaviour
  5. {
  6. public void Awake()
  7. {
  8. if (this.RenderDataList == null || this.RenderDataList.Count <= 0)
  9. {
  10. return;
  11. }
  12. for (int i = 0; i < this.RenderDataList.Count; i++)
  13. {
  14. RenderData renderData = this.RenderDataList[i];
  15. if (renderData != null && !(renderData.Mesh == null) && !(renderData.Mesh.material == null))
  16. {
  17. renderData.Mesh.material.renderQueue = renderData.RenderQueue;
  18. }
  19. }
  20. }
  21. public List<RenderData> RenderDataList;
  22. }