SearchResultGui.cs 866 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Collections.Generic;
  2. using Leopotam.Ecs;
  3. using UnityEditor;
  4. using UnityEngine;
  5. namespace Asset_Cleaner {
  6. class SearchResultGui : IEcsAutoReset {
  7. public SerializedObject SerializedObject;
  8. public List<PropertyData> Properties;
  9. public GUIContent Label;
  10. public string TransformPath;
  11. public void Reset() {
  12. SerializedObject?.Dispose();
  13. SerializedObject = default;
  14. if (Properties != default)
  15. foreach (var propertyData in Properties) {
  16. propertyData.Property.Dispose();
  17. }
  18. Properties = default;
  19. Label = default;
  20. TransformPath = default;
  21. }
  22. public class PropertyData {
  23. public SerializedProperty Property;
  24. public GUIContent Content;
  25. }
  26. }
  27. }