AppVersionProperty.cs 887 B

1234567891011121314151617181920212223242526272829303132
  1. // --------------------------------------------------------------------------------------------------------------------
  2. // <copyright file="AppVersionProperty.cs" company="Exit Games GmbH">
  3. // Part of: Pun Cockpit
  4. // </copyright>
  5. // <author>developer@exitgames.com</author>
  6. // --------------------------------------------------------------------------------------------------------------------
  7. using UnityEngine;
  8. using UnityEngine.UI;
  9. namespace Photon.Pun.Demo.Cockpit
  10. {
  11. /// <summary>
  12. /// PhotonNetwork.AppVersion UI property.
  13. /// </summary>
  14. public class AppVersionProperty : MonoBehaviour
  15. {
  16. public Text Text;
  17. string _cache;
  18. void Update()
  19. {
  20. if (PhotonNetwork.AppVersion != _cache)
  21. {
  22. _cache = PhotonNetwork.AppVersion;
  23. Text.text = _cache;
  24. }
  25. }
  26. }
  27. }