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.
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
// <copyright file="RoomListView.cs" company="Exit Games GmbH">
|
|
|
|
|
// Part of: Pun Cockpit
|
|
|
|
|
// </copyright>
|
|
|
|
|
// <author>developer@exitgames.com</author>
|
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace Photon.Pun.Demo.Cockpit
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// PhotonNetwork.ServerAddress UI property.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ServerAddressProperty : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public Text Text;
|
|
|
|
|
|
|
|
|
|
string _cache;
|
|
|
|
|
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
if (PhotonNetwork.IsConnectedAndReady)
|
|
|
|
|
{
|
|
|
|
|
if (PhotonNetwork.ServerAddress != _cache)
|
|
|
|
|
{
|
|
|
|
|
_cache = PhotonNetwork.ServerAddress;
|
|
|
|
|
Text.text = _cache;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (_cache != "n/a")
|
|
|
|
|
{
|
|
|
|
|
_cache = "n/a";
|
|
|
|
|
Text.text = _cache;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|