Question by 
               abi-kr01 · Aug 23, 2016 at 10:38 AM · 
                ioswwwpersistentdatapathreading data  
              
 
              Reading data from persistent data path (error UnityBlockWWWConnectionIsDone) for ios
we have pre-downloaded some resource files at the time of game loading, now during the game running state, we are trying to load these assets using WWW. Using following code:
  public static AudioClip LoadSound(string AssetPath, string fileName){
             string Path=PlatformPath.GetPlatformSpecificPath()+AssetPath+fileName;
                     // where GetPlatformSpecificPath returns file:/// for ios, @file:// for android
             WWW www = new WWW(Path);    
             while(!www.isDone){
  
             }
             Debug.Log("Resource sound loaded");
             return www.GetAudioClip(false,false,AudioType.MPEG);
          
     }
The above function is working properly on Android and Editor, but on iOS, we get crashes sometimes. On looking at the crash report, the stack trace shows: UnityBlockWWWConnectionIsDone(WWWConnection.mm: 368) iPhoneWWW::IsDownloadDone() const (iPhoneWWW.mm:192) WWW::IsDone() const (WWW.cpp:226)
Have you guys come across such error, if no, then how should we be reading the pre-downloaded file from the persistent data path.
Thanks in advance.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                