private void Awake() { if (Instance == null) { Instance = this; } }
//加载图片的协程 IEnumerator WaitLoadDone(string strImagePath) { yield return(new WaitForEndOfFrame()); Texture tempTex = C_Downloader.LoadByIO(strImagePath); while (tempTex == null) { yield return(null); } cubemap.GetComponent <Renderer>().material.mainTexture = tempTex; }