Although I was able to integrate FMOD into my project, and the PlayOneShot works fine in the Unity Editor (on a Mac computer) or in the Windows standalone, it throws up errors in the Mac standalone.
My code that calls PlayOneShot looks like this:
soundSystem.PlayOneShot("/Character/jump", Vector3.zero);
And my assets look like this:
This all works fine when I play in the editor or make a windows build, but on Mac standalone, I am getting this error in Player.log
FMOD Error (ERR_EVENT_NOTFOUND): The requested event, bus or vca could not be found.
(Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/MacStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)
followed by
NullReferenceException: Object reference not set to an instance of an object
at FMOD_StudioSystem.getEvent (System.String path) [0x00000] in <filename unknown>:0
at FMOD_StudioSystem.PlayOneShot (System.String path, Vector3 position, Single volume) [0x00000] in <filename unknown>:0
at FMOD_StudioSystem.PlayOneShot (System.String path, Vector3 position) [0x00000] in <filename unknown>:0
at FMODManager.playPlayerSound (PlayerSound playerSound) [0x00000] in <filename unknown>:0
at PlayerSoundEffectController.playWalk () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
This happens every time a sound tries to play and only occurs in the Mac standalone. My assumption is that for this standalone I need to provide a different path to the sound.
Alternatively, is there a way I could use a serialized variable for my sound controller?
something like
public FMODsound playerJumpSound;
public void playJump(){
soundSystem.PlayOneShot(playerJumpSound, Vector3.zero);
}
This way I could avoid having to dive into my asset folder entirely.
Thanks for any help.