GameVersionProperty.cs 786 B

123456789101112131415161718192021222324252627282930
  1. // --------------------------------------------------------------------------------------------------------------------
  2. // <copyright file="RoomListView.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.GameVersion UI property.
  13. /// </summary>
  14. public class GameVersionProperty : MonoBehaviour
  15. {
  16. public Text Text;
  17. string _cache;
  18. void Update()
  19. {
  20. if (PhotonNetwork.GameVersion != _cache) {
  21. _cache = PhotonNetwork.GameVersion;
  22. Text.text = _cache;
  23. }
  24. }
  25. }
  26. }