using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SyncGetResources : MonoBehaviour
{
private GameObject go;
ResourceRequest request;
// Start is called before the first frame update
void Start()
{
StartCoroutine(SyncGetRes());
}
IEnumerator SyncGetRes()
{
request = Resources.LoadAsync<GameObject>("GO");
yield return request;
go = request.asset as GameObject;
if(go!= null)
{
Instantiate(go);
Debug.Log("加载完成");
}
else
{
Debug.Log("加载失败");
}
}
// Update is called once per frame
void Update()
{
//加载进度
Debug.Log(request.progress);
}
}