Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

[Remote Assets] Unity freezes when loading addressable sounds from a remote server

Discussion in 'Addressables' started by SleepyAgapornis, Jan 18, 2020.

  1. SleepyAgapornis

    SleepyAgapornis

    Joined:
    Sep 7, 2018
    Posts:
    23
    Hello, I'm facing this problem for a couple of months already, but as it hasn't been fixed in the new version of the addressables package I would like to bring this to your attention.
    What happens is that every single time I try to load addressables from a remote server, if an addressable contains sounds or music, I get a pink screen and unity totally freezes. this only happens if play mode script is set to "Use existing build".
    I have to add that if I compile the project and I run the game everything works just fine, the problem occurs only in the editor.

    this is the console log before unity freezes:

    Cannot create FMOD::Sound instance for resource archive
    Function __cdecl SoundHandle::Instance::~Instance(void) may only be called from main thread!


    I'm on Unity 2018.3
    and the addressables package is on 1.5.1
     
  2. GB_HB

    GB_HB

    Joined:
    Jul 14, 2019
    Posts:
    20
    As indicated by the error the cause may be that you are handing the file off to FMOD before it is loaded as the music file itself.

    Try throwing some debugs in there to see when the addressable loads to it's asset.
     
  3. SleepyAgapornis

    SleepyAgapornis

    Joined:
    Sep 7, 2018
    Posts:
    23
    I think this issue has to do with FMOD being used in editor mode and not being compatible with WebGL AAC audio format, which is the target build I'm using, causing the editor to freeze.
    I've done some more test and I've stepped into this warning as well:

    assets bundles built with build target WebGL may not be compatible with running in the editor.

    anyway, it is super annoying having to close the process from the task manager because of unity freezes.
     
  4. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    I'll send this post over for you @antharesx to see if the staff will have a look!
     
    SleepyAgapornis likes this.