RendererObject.cs 814 B

12345678910111213141516171819202122232425262728293031323334
  1. using UnityEngine;
  2. namespace LunarCatsStudio.SuperCombiner
  3. {
  4. /// <summary>
  5. /// RendererObject
  6. /// A simple class for renderer objects
  7. /// </summary>
  8. public class RendererObject<T>
  9. {
  10. // The reference to the renderer
  11. private T renderer;
  12. public T Renderer
  13. {
  14. get { return renderer; }
  15. set { renderer = value; }
  16. }
  17. // True if this renderer will be combined
  18. private bool willBeCombined = true;
  19. public bool WillBeCombined
  20. {
  21. get { return willBeCombined; }
  22. set { willBeCombined = value; }
  23. }
  24. public RendererObject(T renderer, bool willBeCombined = true)
  25. {
  26. Renderer = renderer;
  27. WillBeCombined = willBeCombined;
  28. }
  29. }
  30. }