You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
913 B

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IsConnectedProperty.cs" company="Exit Games GmbH">
// Part of: Pun Cockpit
// </copyright>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine.UI;
using Photon.Realtime;
namespace Photon.Pun.Demo.Cockpit
{
/// <summary>
/// PhotonNetwork.Server UI property
/// </summary>
public class ServerProperty : PropertyListenerBase
{
public Text Text;
ServerConnection _cache;
void Update()
{
if (PhotonNetwork.Server != _cache)
{
_cache = PhotonNetwork.Server;
Text.text = PhotonNetwork.Server.ToString();
this.OnValueChanged();
}
}
}
}