result = eventInstance.getChannelGroup(out channelGroup);
if (result != FMOD.RESULT.OK)
{
Debug.Log(FMOD.Error.String(result));
}
The specified resource is not loaded, so it can’t be unloaded.
UnityEngine.Debug:Log(Object)
Above is the code and the error i get. The event is created and is playing back in unity. I’m not sure why I can’t return it’s channel group? any ideas?
             
            
              
              
              
            
            
           
          
            
            
              It is not possible to get the ChannelGroup until the Event Instance is successfully loaded. Try to loop until the result is FMOD.RESULT.OK. I do that in a coroutine like this:
 IEnumerator GetChannelGroup()
{
    if (instance.isValid())
    {
        while (instance.getChannelGroup(out channelGroup) != FMOD.RESULT.OK)
        {
            yield return new WaitForEndOfFrame();
        }
   // do stuff
    }
    else
    {
        Debug.Log("Instance not valid");
        yield return null;
    }
}
             
            
              
              
              
            
            
           
          
            
            
              Hey, I kinda thought this might be the issue! but i never tried it out for some reason. Thank you so much for your reply, extremely helpful!
             
            
              
              
              1 Like