Answered
0
0

I’m having trouble accessing mixerstrips in Unity. I downloaded the latest Fmod Studio and Unity package from this site.

I have a separate strip for SFX and music and want the user to control their volume independently.

I have found some code here to do this, but I keep getting the following error:

Assets/_Scripts/menu/MenuUIManager.cs(27,29): error CS0234: The type or namespace name MixerStrip' does not exist in the namespaceFMOD.Studio’. Are you missing an assembly reference?

the line refered to is

FMOD.Studio.MixerStrip sfxBus;

the code I use is based on:

   public float volume = 1.0f;
   FMOD.Studio.MixerStrip sfxBus;

   void Start()
   {
      FMOD.GUID guid;
      FMOD.Studio.System system = FMOD_StudioSystem.instance.System;
      system.lookupID("bus:/SFX", out guid);
      system.getMixerStrip(guid, FMOD.Studio.LOADING_MODE.BEGIN_NOW, out sfxBus);
   }

   void Update()
   {
      sfxBus.setFaderLevel(volume);
   }

Any ideas. What am I missing?

Thanks,
Jeroen

  • You must to post comments
Best Answer
1
0

That API was changed in 1.5. There are some notes about it in the
documentation.

The new function is called getBus and takes a string which can either be a name or a guid representation. So your new code should look like this:

void Start()
{
   FMOD.Studio.System system = FMOD_StudioSystem.instance.System;
   system.getBus("bus:/SFX", out sfxBus);
}
  • You must to post comments
0
0

Thanks Geoff!

Should have read the docs more carefully.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.