add Physics support

This commit is contained in:
1605296300@qq.com
2022-08-10 16:54:20 +08:00
parent 33c8d35c84
commit f797fbb2fd
855 changed files with 649609 additions and 98 deletions
+15 -6
View File
@@ -7,16 +7,25 @@ public class UmaViewerDownload : MonoBehaviour
{
public static IEnumerator DownloadText(string url, System.Action<string> callback)
{
UnityWebRequest www = UnityWebRequest.Get(url);
yield return www.SendWebRequest();
if (www.result != UnityWebRequest.Result.Success)
if (PlayerPrefs.GetString(url, "")=="")
{
Debug.Log(www.error);
UnityWebRequest www = UnityWebRequest.Get(url);
yield return www.SendWebRequest();
if (www.result != UnityWebRequest.Result.Success)
{
Debug.Log(www.error);
}
else
{
PlayerPrefs.SetString(url, www.downloadHandler.text);
callback(www.downloadHandler.text);
}
}
else
{
callback(www.downloadHandler.text);
callback(PlayerPrefs.GetString(url, ""));
}
}
}