Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RawImageTestHook.cs 817B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class RawImageTestHook : RawImage
  6. {
  7. public bool isGeometryUpdated;
  8. public bool isCacheUsed;
  9. public bool isLayoutRebuild;
  10. public bool isMaterialRebuild;
  11. public void ResetTest()
  12. {
  13. isGeometryUpdated = false;
  14. isLayoutRebuild = false;
  15. isMaterialRebuild = false;
  16. isCacheUsed = false;
  17. }
  18. public override void SetLayoutDirty()
  19. {
  20. base.SetLayoutDirty();
  21. isLayoutRebuild = true;
  22. }
  23. public override void SetMaterialDirty()
  24. {
  25. base.SetMaterialDirty();
  26. isMaterialRebuild = true;
  27. }
  28. protected override void UpdateGeometry()
  29. {
  30. base.UpdateGeometry();
  31. isGeometryUpdated = true;
  32. }
  33. }