FrameRateUiHolder.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Copyright(c) Live2D Inc. All rights reserved.
  3. *
  4. * Use of this source code is governed by the Live2D Open Software license
  5. * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
  6. */
  7. using UnityEngine;
  8. using UnityEngine.UI;
  9. namespace Live2D.Cubism.Samples.AsyncBenchmark
  10. {
  11. /// <summary>
  12. /// Record when the frame rate falls below the set target frame rate.
  13. /// </summary>
  14. public class FrameRateUiHolder : MonoBehaviour
  15. {
  16. /// <summary>
  17. /// Enable/disable observation.
  18. /// </summary>
  19. [SerializeField]
  20. public bool HasShownFrameRate;
  21. /// <summary>
  22. /// Whether to enable total uptime.
  23. /// </summary>
  24. [SerializeField]
  25. public bool HasShownElapsedTime;
  26. /// <summary>
  27. /// Displays the frame rate and observation time when the maximum frame rate is observed.
  28. /// </summary>
  29. [SerializeField]
  30. public Text HighestFrameRateUi = null;
  31. /// <summary>
  32. /// Displays the frame rate and observation time when the minimum frame rate is observed.
  33. /// </summary>
  34. [SerializeField]
  35. public Text LowestFrameRateUi = null;
  36. /// <summary>
  37. /// UI to display total benchmark uptime.
  38. /// </summary>
  39. [SerializeField]
  40. public Text ElapsedTimeUi = null;
  41. }
  42. }