Answered
0
0

Hello, I am working on a game with multiple cameras. At each scene change the game jumping to another camera and I am trying to stick a listener on each camera and switch between these with the following script:

Switch to scene00:
FMODUnity.RuntimeManager.SetListenerLocation(0, null, null);

Switch to scene01:
FMODUnity.RuntimeManager.SetListenerLocation(1, null, null);

Switch to scene01:
FMODUnity.RuntimeManager.SetListenerLocation(2, null, null);

Unfortunately, it’s not so simple. Anyone has an idea how to solve this problem? Am I on the right track?

  • You must to post comments
Best Answer
0
0

The total number of listeners isn’t updated until the first Update() of the RuntimeManager after a new listener is found.
You can use FMODUnity.RuntimeManager.StudioSystem.getNumListeners() to test this is the issue, and use setNumListeners before SetListenerLocation to ensure enough listeners have been allowed for.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.