PUN使用のためのネットワーク接続チェックスクリプト.UIのパネルをsetactivateをfalseにする.
using UnityEngine;
using System.Collections;
public class netCheck : MonoBehaviour {
public GameObject netAlertPanel;
// Use this for initialization
void Start () {
if (Application.internetReachability == NetworkReachability.NotReachable) {
//接続されていないときの処理
netAlertPanel.SetActive (true);
} else {
netAlertPanel.SetActive (false);
}
}
// Update is called once per frame
void Update () {
}
public void closeAlert(){
netAlertPanel.SetActive (false);
}
}