Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Surface.cs 757B

12345678910111213141516171819202122232425262728293031323334
  1. using Unity.Collections;
  2. using Unity.Collections.LowLevel.Unsafe;
  3. using UnityEngine;
  4. namespace PDNWrapper
  5. {
  6. internal class Surface
  7. {
  8. NativeArray<Color32> m_Color;
  9. public Surface(int w, int h)
  10. {
  11. width = w;
  12. height = h;
  13. m_Color = new NativeArray<Color32>(width * height, Allocator.Persistent);
  14. }
  15. public void Dispose()
  16. {
  17. if (m_Color.IsCreated)
  18. {
  19. m_Color.Dispose();
  20. m_Color = default;
  21. }
  22. }
  23. public NativeArray<Color32> color
  24. {
  25. get { return m_Color; }
  26. }
  27. public int width { get; private set; }
  28. public int height { get; private set; }
  29. }
  30. }