Search Unity

FMOD::SOUND INSTANCE FOR RESOURCE ERROR with Asset Bundles

Discussion in 'Audio & Video' started by rebelincontrol, Sep 16, 2016.

  1. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Hi -

    I'm aware this is the forum and not the issue tracker, but the following issue has regressed, several people have noticed it but we cannot reopen it as it was fixed.

    https://issuetracker.unity3d.com/issues/fmod-sound-instance-for-resource-error

    I have emailed the support address for the Unity QA team but have had no reply, and this issue has held us back from a release, which, naturally, is not good.

    We need to have this looked at ASAP, so I'm hoping one of the Unity guys on here can at least pass it on to a developer.

    The issue occurs when using asset bundles, some sounds don't play - i've tried changing the preload audio settings etc but to no avail. Sounds work perfectly ok in non bundled scenes.

    Running 5.4.1 (but it regressed in the 5.4.0 I believe). Several comments on the issue I linked support that.

    Thanks,
    Jake
     
  2. SomeTallGy

    SomeTallGy

    Joined:
    Jan 3, 2014
    Posts:
    18
    Jake has this been resolved for you? Or have you found a workaround? We're stuck in the same boat :(
     
  3. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    I'm afraid not @SomeTallGy

    I've emailed support but it seems they're blind to it because the ticket was previously closed.

    Very frustrating!
     
  4. fredrik-larsson

    fredrik-larsson

    Joined:
    Nov 3, 2015
    Posts:
    29
  5. SomeTallGy

    SomeTallGy

    Joined:
    Jan 3, 2014
    Posts:
    18
    Wow -- how can something like this be ignored for this long? This is an essential feature for streaming based games.
     
  6. SomeTallGy

    SomeTallGy

    Joined:
    Jan 3, 2014
    Posts:
    18
    Okay -- there might be some light at the end of the tunnel. While we seem to be getting errors in the editor, loading audioclips from assetbundles seems to work fine when we actually run it in a WebGL build. I have not tried other builds types such as mobile or desktop, but since our game is WebGL focused thus you can imagine our relief considering that streaming/downloading assets is pretty much required in our architecture.

    Thus, I wonder if this issue is only happening in the editor? If it is, we might consider this little more than an annoying false alarm that can be gotten around if we run tests in the editor while in simulation mode per Unity's AssetBundleManager class.

    Have you folks been experiencing the problem in your deployment builds?
     
  7. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    I completely agree, it's held us back from releasing an otherwise ready app for the last month, which nobody is happy about!

    We're building for iOS, and sadly the problem persists on device builds :(

    I've replied to the support guys via another bug I opened asking them to see if they can have a look at it.. I don't know if it will do anything but you never know. It's a bit crazy that the ticket can't be reopened even though it has so much activity. I have seen a couple of similar tickets but they don't seem to be responding to those, either.

    Much love to the Unity team of course, but this is a serious issue and I'm not a happy chappy right now.
     
  8. Handelabra

    Handelabra

    Joined:
    Sep 25, 2014
    Posts:
    4
    We are getting reports of this problem from users on certain older iOS devices (perhaps 32 bit ones?) running iOS 10. It occurs with any music, but not sound effects. It doesn't seem to matter whether the music comes from an asset bundle or not, the error happens with both. We're using Load Type: Streaming, Compression Format: Vorbis.

    Error: Cannot create FMOD::Sound instance for resource sharedassets1.resource, (An error occured that wasn't supposed to. Contact support. )
     
  9. Handelabra

    Handelabra

    Joined:
    Sep 25, 2014
    Posts:
    4
  10. firtina

    firtina

    Unity Technologies

    Joined:
    Jan 22, 2016
    Posts:
    5
    We have the fix for the issue (32-bit devices that use iOS 10 unable to load and play streaming audio). It is going through internal reviews at the moment.

    After the reviews have been completed it should be in all supported versions (including patches for 5.3 and 5.4).
     
  11. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Thanks @firtina - we're all looking forward to that, i'm sure :)
     
    firtina likes this.
  12. fredrik-larsson

    fredrik-larsson

    Joined:
    Nov 3, 2015
    Posts:
    29
    Just to clarify this fix will also work on the PC/Consoles?
     
    Last edited: Nov 3, 2016
  13. firtina

    firtina

    Unity Technologies

    Joined:
    Jan 22, 2016
    Posts:
    5
    @fredrik-larsson the fix I mentioned is only for iOS devices, it will not affect PC or Consoles. Are you seeing the same or a similar error for PC and Consoles?

    The iOS 10 on 32-bit device bug has this error message: "Error: Cannot create FMOD::Sound instance for resource resources.resource, (An error occured that wasn't supposed to. Contact support. )"

    The "Cannot create FMOD::Sound instance for resource archive ... (File not found. )" error message from the link in your reply at #4 could have a separate workaround or fix and may need a bug case of its own. I have taken a look within our bug database and found that in some cases it was caused by users unloading the asset bundles while the sound resources were still needed. It may help to check if that is happening in your situation. Some other cases for similar error messages appear to have been fixed for 5.3 and onwards.
     
  14. fredrik-larsson

    fredrik-larsson

    Joined:
    Nov 3, 2015
    Posts:
    29
    Yes I'm seeing this issue on the XboxOne, PS4 and PC platforms currently.

    Here is a link to a forum post I wrote on the issue: https://forum.unity3d.com/threads/l...assetbundles-in-unity-5-does-not-work.434881/

    We are also experiencing this: https://forum.unity3d.com/threads/streaming-audio-error-cannot-create-fmod-sound-instance.431824/ when streaming audio from the WWW class and /StreamingAssets/ folder.

    If I build an AssetBundle with a referenced AudioClip being placed in the /StreamingAssets/ folder will this cause the error this thread talks about? The relevant AssetBundle is not unloaded or unreferenced while we are waiting for streaming to complete.
     
  15. firtina

    firtina

    Unity Technologies

    Joined:
    Jan 22, 2016
    Posts:
    5
    Yes those two look different from the iOS one. I am currently assigned only to the 32-bit iOS 10 bug but I will subscribe to updates for the other threads.

    If you haven't already, submitting a report for your case will help to verify if yours is a duplicate of others or a new case.
     
  16. JohnShaughnessy

    JohnShaughnessy

    Joined:
    Jan 3, 2014
    Posts:
    1

    I'm getting this issue on 5.4.2p3 pc / mac / android when I try to essentially unload all my asset bundles and reload my scene. How can I tell when sound resources are no longer needed or enforce that they are no longer needed?
     
    Last edited: Nov 16, 2016
  17. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Has this been released in a patch yet @firtina ? I don't think it has but in case I've missed it :p
     
  18. jfperusse_bhvr

    jfperusse_bhvr

    Joined:
    Nov 11, 2014
    Posts:
    7
    Is there a workaround we can implement ourselves in the XCode project as we wait for a patch to be released?
     
  19. firtina

    firtina

    Unity Technologies

    Joined:
    Jan 22, 2016
    Posts:
    5
    For the 32-bit ios 10 bug:
    • @rebelincontrol It is aimed to be in the next patches of 5.4 and 5.3: 5.4.3p1 and 5.3.7p2. Also it will be in 5.5 and onwards too.
    • @jfperusse_bhvr Unfortunately not for this bug
     
  20. c_andrews

    c_andrews

    Joined:
    Jan 26, 2015
    Posts:
    42
    If your having the issue on other devices try removing the Audio Source from the game object and add it again. It worked for me and i spent hours banging my head against a wall.
     
  21. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    @firtina

    Thanks for your response. Unfortunately I can't attach the project due to an NDA.

    The issue regarding iOS10 32bit specifically seems to be resolved, mine is something new but related. I'm now running the same app on iOS & Android and having the same issue in the editor as well when loading those bundles. The sounds work consistently the first time I load a scene in the bundle, and then when I load another scene in the same bundle, the sound throws:

    Error: Cannot create FMOD::Sound instance for resource archive:/BuildPlayer-SCENENAME/BuildPlayer-SCENENAME.resource, (File not found. )

    I can then return to the main menu of the app (not part of a bundle) and reload the same bundle again and the same thing happens, with it working on the first scene. This is running 5.5.0f3.

    I have however tried to create a test project and it's working as it should, so I wonder if my project has become corrupted or perhaps the complexity of the scene setups have caused an issue. I have tried reimporting all assets and reinstalling Unity on several occasions to no avail.

    I realise this isn't the greatest help to your developers but I would appreciate any help you can give, this needs to be fixed in order to maintain and update our app (I'm stuck on 5.3.5p5 at the moment, I had to roll back to get it to work a while ago, perhaps that caused corruption.. running two copies now, one to try and debug this in 5.5 and one in case I need to update any fixes in 5.3.5p5). If possible feel free to open a private line of communication with me, I may be able to give more details in that case.

    Thanks again!

    macOS Sierra 10.12.2
     
  22. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Update: Tomorrow I'm going to try and strip down a copy of the problematic project, keeping only the audio and asset bundle functionality. Hopefully I can get it to a point where I can send it to you guys without violating any legal stuff...
     
  23. firtina

    firtina

    Unity Technologies

    Joined:
    Jan 22, 2016
    Posts:
    5
    @rebelincontrol I have done some searching and for some cases the bug was happening after unloading bundles - for one case specifically with AssetBundle.Unload while other resources still tried to use sound assets -, however your situation sounds a bit different (from what I can tell, loading one scene then another; without any unloading?)

    If you can submit a bug with the stripped copy of the project that will certainly help us resolve it. Please feel free to send a PM to me with more details and I can forward it to relevant teams.
     
  24. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Thanks @firtina, I uploaded a sample project with the problem a few days ago. I'll pm you the link.
     
  25. robertslr

    robertslr

    Joined:
    Sep 24, 2015
    Posts:
    7

    Hi all.
    I've been experiencing this issue yesterday. I came up with a turnaround solution.
    In my game i need to load a few audio clips from an asset bundle.
    As Firtina says, the error happen when you Unload the asset bundle before load an Audio Clip.
    The Error i get is "Error: Cannot create FMOD::Sound instance for resource archive:{path}, (File not found. )"
    If you DON'T unload the asset bundle and try to play the sound, everything works as expected. This is because the Audio clip get successfully loaded.
    If you Unload the asset bundle the Audio clip is unable to load itself into the game.
    My turnaround is to add this piece of code inside you Load Asset bundle method.


    Code (CSharp):
    1.      
    2.         // Here your Download and Load Asset bundle code....
    3.      
    4.         AssetBundleRequest requestAudioClips = assetBoundle.LoadAllAssetsAsync<AudioClip>();
    5.         yield return requestAudioClips;
    6.         Debug.Log("Clips Count: " + requestAudioClips.allAssets.Length);
    7.         for (int i = 0; i < requestAudioClips.allAssets.Length; i++) {
    8.             var audioFile = requestAudioClips.allAssets[i] as AudioClip;
    9.             Debug.Log("Audio Intial LoadState: " + audioFile.loadState);
    10.             if (audioFile.loadState == AudioDataLoadState.Unloaded || audioFile.loadState == AudioDataLoadState.Failed ){
    11.                 audioFile.LoadAudioData();
    12.             }
    13.             Debug.Log("Audio Final LoadState: " + audioFile.loadState);
    14.         }
    15.         assetBoundle.Unload(false);
    16.         Resources.UnloadUnusedAssets();
    17.  
    18.  
    It will load all the the Audio clips before Unload the asset bundle.
    It will ensure you are able to play them without any problem.



    EDIT : 19/04/2017 , Loading the audio doesn't work anymore. Do not use the code anymore.
    I don't even know if it worked before as it looks like the bug is reproduced (at least for me) only if the audio is played in a second time.
     
    Last edited: Apr 19, 2017
  26. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    55
    I upgraded from 5.3.5 to 5.6 and started getting this error in the editor when loading audio from bundles. LoadAudioData() before unloading does not solve the issue. All sounds have "preload audio" checked anyway.

    This has to be a bug. AssetBundle.Unload(false) isn't supposed to delete loaded assets. Based on what I've read here any asset bundles with sounds have to be open perpetually since Play() could be called at any time.

    EDIT:

    So I made a test project to show this was broken, and the sound played. Confused, I went back to the main project, and it works! ... The first time. Stopping and starting the scene causes the error to come back. This doesn't happen in the test project or a release build.
     
    Last edited: Apr 19, 2017
  27. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    55
    I successfully reproduced this in a test project and submitted it in a bug report.

    The gist of it is if you load an AudioClip from a bundle in one scene and play it in another, it throws this FMOD error starting on the second Editor/Scene play.
     
  28. cyberhassy

    cyberhassy

    Joined:
    Aug 14, 2015
    Posts:
    1
    Reproduced this bug in 5.5.3p1 after upgrading from 5.4.2.p4.below error occurs when loading mp3 files using UnityWebRequest in iOS
    Error: Cannot create FMOD::Sound instance for resource x\220\214, (Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.
    I'm Confused...please let me know if there a workaround for this issue
     
  29. robertslr

    robertslr

    Joined:
    Sep 24, 2015
    Posts:
    7
    Hi All,
    I updated the project to Unity 5.6.0f3 , and yes the bug is still present.
    @TechCor did you report the bug on issue tracker?
    My app is one scene only and the problem still perform.
    In my test the audio play correctly, even when the Asset Bundle has been unloaded, if you play the clip on the Awake. it also works in the next loop cycles.
    The problem occurs if the AudioClip.Play() is called after the Asset Bundle has been unloaded.
     
  30. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Hey guys. FYI a bug has been submitted and has been reproduced on Unity's end, although this was about a month ago and I haven't heard anything since. I've sent another follow up email with a link to this thread so hopefully they'll see it's got some traction, and if you're all submitting bug reports too we might actually get this fixed. (I've been stuck on 5.3.5p5 since August/Sept 2016, and I'm itching to update). 5.3.5p5 is the most recent version without the bug present (I tested most up to 5.5, and have recently tried 5.6.0f3, still there).

    I'll let you know if I hear anything back from my follow up email.
     
    Last edited: Apr 20, 2017
  31. TechCor

    TechCor

    Joined:
    Apr 3, 2015
    Posts:
    55
    Yes, this issue is irritating. Apparently pausing and unpausing a scene will trigger this problem, too. 5.6 is nearly unusable like this and needs a patch release with this fixed.
     
  32. robertslr

    robertslr

    Joined:
    Sep 24, 2015
    Posts:
    7
    Hi guys,
    I found a quite dirty turnaround solution.
    As pointed out before the error occurs when you try to Play an audio clip after the asset bundle has been unloaded.
    On my first tests the clip plays correctly when the audio is loaded on the Audio Source component and played on Awake method.
    Of course the ideal option is to be able to play an audio whenever we want. When you attempt to play an Audio after the asset bundle has been unloaded, it fails an the "Error: Cannot create FMOD::Sound instance"... Error shows up.
    Right now I can play the audio whenever I want using by add the audio on a Audio Play on Awake, Play and Stop it instantly. After that It is possible to call _audioSource.Play(); whenever you want while the Object is on scene, even if the Asset Bundle has been unloaded (of course with false parameter, as the objects shouldn't be destroyed).

    Here you can use the following code snipped attached on an asset bundle.
    It has been tested on Unity editor 5.6.03f and on my iPhone 6, iOS 10 and Xcode 8.3. Both without error and with the audio being played as expected.
    You can attach the script below on an object stored in an Asset Bundle. To test if the audio plays correctly you can simply tap on the debug boolean on inspector. You can always call the PlayAudio method from other sources.
    Please make sure to store all information about the audio clip on the Coroutine created on the script. After that it won't be able to retrive proprieties from the audio clip.
    No special implementations are required on the Asset Bundle downloading code. Simply load the object and after that Unload the asset bundle using assetBundle.Unload(false); . Make sure to clear cache or change version code before testing the new object.
    The audio i'm using have the following settings: http://i.imgur.com/kKBK82S.png . Different settings might be used, but I haven't test them.


    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class PlayAudioOnAssetBundle : MonoBehaviour {
    7.  
    8.     public bool         playAudioDebug;// Debug bool flag visible on inspector. If you tap on the button, the audio will be played.
    9.     public AudioSource     preloadedAudioSource;// you can set the audio on inspector. If not set, a new AudioSource will be Created automatically.
    10.     public AudioClip     audioClipToPlay;// set the audio on inspector. I'm using this import settings: http://i.imgur.com/kKBK82S.png . Probably all import settings work, but they are not tested.
    11.  
    12.  
    13.  
    14.  
    15.  
    16.     void Awake () {
    17.         if (!preloadedAudioSource){
    18.             preloadedAudioSource = gameObject.AddComponent<AudioSource>();
    19.         }
    20.         StartCoroutine(LoadAudioClipOnAudioSource(preloadedAudioSource ,audioClipToPlay ));
    21.     }
    22.    
    23.  
    24.  
    25.  
    26.  
    27.     void Update () {
    28.         if (playAudioDebug){// if the debug boolean is manually set to TRUE on inspector, the audio will be played.  
    29.             PlayAudio();// Play the audio.
    30.             playAudioDebug=false;// Reset it back to FALSE.
    31.         }
    32.     }
    33.  
    34.  
    35.  
    36.  
    37.  
    38.     /// <summary>
    39.     /// Play the audio whenever you want, even if the Asset Bundle has been unloaded.
    40.     /// </summary>
    41.     /// <param name="audioSource">Audio source.</param>
    42.     public void PlayAudio () {
    43.         preloadedAudioSource.Play();
    44.     }
    45.  
    46.  
    47.  
    48.  
    49.  
    50.  
    51.     /// <summary>
    52.     /// Loads the audio clip on audio source. Used to FIX "Error: Cannot create FMOD::Sound instance" Asset Bundle bug.
    53.     /// See more here: https://forum.unity3d.com/threads/fmod-sound-instance-for-resource-error-with-asset-bundles.431456 .
    54.     /// Please not that you can't get information from the audio clip after the Awake method. Any attemp will replicate the FMOD error.
    55.     /// Consider reference all informations needed befroe call the Play function in this Mehtod.
    56.     /// </summary>
    57.     /// <returns>The audio clip on audio source.</returns>
    58.     /// <param name="audioSource">Audio source.</param>
    59.     /// <param name="audioClip">Audio clip.</param>
    60.     IEnumerator LoadAudioClipOnAudioSource (AudioSource audioSource , AudioClip audioClip) {
    61.  
    62.         audioSource.clip = audioClip;
    63.         //Get all informations needed form the audioClip (length etc..)and store them into a reference class or a struct. You can't retrive info about the clip anymore.
    64.         audioSource.Play();
    65.         yield return new WaitEndOfFrame();
    66.         audioSource.Pause();
    67.         // After that you can't get any information from the audio clip. If you attems to do so, the FMOD error will show up.
    68.     }
    69. }
    70.  
     
  33. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,692
    Sadly enough this doesn't fix it for me.
    Getting
    Code (CSharp):
    1. Error: Cannot create FMOD::Sound instance for resource , (File not found. )
    when loading all sound files in a folder to a list and then try to assign them to an audiosource on Awake()

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. [System.Serializable]
    4. public class RandomSound
    5. {
    6.     public string clipName;
    7.     public AudioClip clip;
    8.     public bool loop;
    9.     public int loopAmount;
    10.     [RZ.FishingSimulator.MinMaxSliderAttribute(1,100)]
    11.     public Vector2 randomLoops;
    12.     [RZ.FishingSimulator.MinMaxSliderAttribute(-3,3)]
    13.     public Vector2 randomPitch;
    14.     [RZ.FishingSimulator.MinMaxSliderAttribute(0,1)]
    15.     public Vector2 randomVolume;
    16.     [RZ.FishingSimulator.MinMaxSliderAttribute(-1,1)]
    17.     public Vector2 randomPan;
    18.     public AudioSource source;
    19.    
    20.     public void SetValuesToClip(  )
    21.     {
    22.         source.clip = clip;
    23.         source.playOnAwake = false;
    24.         source.loop = loop;
    25.         if( loop )
    26.             loopAmount = (int)Random.Range( randomLoops.x, randomLoops.y );
    27.         source.pitch = Random.Range( randomPitch.x, randomPitch.y );
    28.         source.volume = Random.Range( randomVolume.x, randomVolume.y );
    29.         source.panStereo = Random.Range( randomPan.x, randomPan.y );
    30.     }
    31. }
    32.  
    Code (CSharp):
    1. using System.Collections;
    2. using System.IO;
    3. using UnityEngine;
    4.  
    5. public class AmbientSoundSystem : MonoBehaviour {
    6.  
    7.     public RandomSound[] m_RandomSounds = { };
    8.     public AudioSource[] m_Sources = { };
    9.  
    10.     public void StartLoadRandomClips( string path, int index )
    11.     {
    12.         StartCoroutine( LoadRandomAudioClips( path, index ) );
    13.     }
    14.     public IEnumerator LoadRandomAudioClips( string path, int index )
    15.     {
    16.         WWW www = new WWW( path );
    17.         yield return www;
    18.         m_RandomSounds[index].clip = www.GetAudioClip( false );
    19.         m_RandomSounds[index].clipName = Path.GetFileName( path );
    20.         m_RandomSounds[index].clip.name = m_RandomSounds[index].clipName;
    21.     }
    22.  
    23.     void Awake( )
    24.     {
    25.         m_Sources = new AudioSource[m_RandomSounds.Length];
    26.         for( int i = 0 ; i < m_RandomSounds.Length ; i++ )
    27.         {
    28.             //GameObject sourceGO = new GameObject();
    29.             //AudioSource source = sourceGO.AddComponent<AudioSource>( );
    30.             m_RandomSounds[i].SetValuesToClip(  );
    31.             //m_Sources[i] = source;
    32.         }
    33.     }
    34. }
    35.  
     
  34. rebelincontrol

    rebelincontrol

    Joined:
    May 19, 2015
    Posts:
    19
    Hey -

    Unsure if this will work for you but upgrading to 2017.2.1f1 fixed for me.

    Good luck!
     
  35. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,692
    thanks, will try but then the whole team( 30+) has to upgrade, who knows what this will break :s

    EDIT: Just tried in 2018 (osx) version i have installed at home and still get the same error.
    :(
    Screen Shot 2018-03-27 at 23.51.01.png
    Screen Shot 2018-03-27 at 23.51.17.png
     
    Last edited: Mar 27, 2018
  36. 4ipideil

    4ipideil

    Joined:
    Jan 22, 2015
    Posts:
    8
    for me this is working

    Code (CSharp):
    1. IEnumerator DownloadAndCache()
    2.     {
    3.         // Wait for the Caching system to be ready
    4.         while (!Caching.ready)
    5.             yield return null;
    6.  
    7.         // Load the AssetBundle file from Cache if it exists with the same version or download and store it in the cache
    8.         //using (WWW www = new WWW(url))
    9.         using (WWW www = WWW.LoadFromCacheOrDownload(url, version))
    10.         {
    11.             yield return www;
    12.             if (www.error != null)
    13.                 throw new System.Exception("WWW download had an error:" + www.error);
    14.             Debug.Log("asset commentator loaded " + www.bytesDownloaded + " bytes");
    15.             AssetBundle bundle = www.assetBundle;
    16.             Object go = null;
    17.             if ((assetName == "") || (assetName == null))
    18.                 go = Instantiate(bundle.mainAsset);
    19.             else
    20.                 go = Instantiate(bundle.LoadAsset(assetName));
    21.  
    22.             // Unload the AssetBundles compressed contents to conserve memory
    23.             // bundle.Unload(false);
    24.             Resources.UnloadUnusedAssets();
    25.  
    26.             if (onAssetLoaded != null)
    27.                 onAssetLoaded(go);
    28.         }
    29.     }

    the difference is here, that i didnt do this : bundle.Unload(false)
    i dont know how it will goes further, i just started to work with AssetBundles, but all is working perfect for now

    Note: i used not audio file as asset, but a prefab with array of AudioClips[] as serialized filed
     
  37. MontanaAnton

    MontanaAnton

    Joined:
    Feb 16, 2014
    Posts:
    5
    it worked for me
     

    Attached Files: