SampleBase.cs 758 B

12345678910111213141516171819202122232425262728293031
  1. using Best.HTTP.Examples.Helpers.SelectorUI;
  2. using UnityEngine;
  3. namespace Best.HTTP.Examples.Helpers
  4. {
  5. abstract class SampleBase : MonoBehaviour
  6. {
  7. #pragma warning disable 0649, 0169
  8. [Header("Common Properties")]
  9. public string Category;
  10. public string DisplayName;
  11. [TextArea]
  12. public string Description;
  13. #pragma warning restore
  14. public RuntimePlatform[] BannedPlatforms = new RuntimePlatform[0];
  15. protected SampleSelectorUI sampleSelector;
  16. protected virtual void Start()
  17. {
  18. #if UNITY_2023_1_OR_NEWER
  19. this.sampleSelector = FindAnyObjectByType<SampleSelectorUI>();
  20. #else
  21. this.sampleSelector = FindObjectOfType<SampleSelectorUI>();
  22. #endif
  23. }
  24. }
  25. }