jx_client_neibu/wb_unity_pro/Assets/Scripts/textwww.cs

35 lines
693 B
C#
Raw Normal View History

2025-06-10 16:11:48 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class textwww : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
StartCoroutine(TestLink("http://124.222.76.196:6789/NewFK/config/init2_1_2.json"));
}
// Update is called once per frame
void Update()
{
}
IEnumerator TestLink(string url)
{
WWW www = new WWW(url);
yield return www;
if (string.IsNullOrEmpty(www.error))
{
Debug.Log("链接可访问: " + url);
}
else
{
Debug.LogError("访问失败: " + www.error);
}
}
}