IEnumerator InstantiateAsset(string remoteAsset, string localFile) { RemoteFile rf = new RemoteFile(remoteAsset, localFile); yield return StartCoroutine(rf.Download()); yield return StartCoroutine(rf.LoadLocalBundle()); Instantiate(rf.LocalBundle.mainAsset); rf.UnloadLocalBundle (); }
IEnumerator InstantiateAsset(string remoteAsset, string localFile) { RemoteFile rf = new RemoteFile(remoteAsset, localFile); yield return(StartCoroutine(rf.Download())); yield return(StartCoroutine(rf.LoadLocalBundle())); Instantiate(rf.LocalBundle.mainAsset); rf.UnloadLocalBundle(); }