Answered
0
0

I’m working on a game in Unity 5, and I’m having problems when building for mac, which also used to be a problem in the editor.

Every time I would load the project, I would have to remove the FMOD_Listener script from the Camera, and then re-attach it, or it would be unable to find the files and would interrupt game initialization and spit out a bunch of errors, and there’d be no audio.

The problem went away for the most part when I started adding other scenes, and launching the camera from a menu instead of simply playing it in the scene.

However, when I build for OSX, I get the exact same problem – no audio, game chugs, and the log has a bunch of errors about being unable to find the files.

The PC build works perfectly fine, and it works perfectly fine in the editor. The problem only arises on the mac build.

If I make a development build, I get the error “Cannot read /users/myname/etc/etc/FileName.app/Contents/data/streamingassets/fmod_bank_list.txt could not find part of the path”

And… well there is no contents/data/streamingassets folder, it’s just data/managed.

  • You must to post comments
Best Answer
0
0

Find the line of code if FMOD_Listener.cs that says (line 69 in the latest)

    else if (Application.platform == RuntimePlatform.OSXPlayer ||
        Application.platform == RuntimePlatform.OSXDashboardPlayer)
    {
        bankPath = Application.dataPath + "/Data/StreamingAssets";
    }

and replace it with

    else if (Application.platform == RuntimePlatform.OSXPlayer ||
        Application.platform == RuntimePlatform.OSXDashboardPlayer)
    {
        bankPath = Application.streamingAssetsPath;
    }
  • You must to post comments
0
0

So, OP here. I fixed the problem simply by copying the streamingassets folder from the unity project to the .app contents.

Kludge, but seems to be working. Still odd that it didn’t properly compile it though.

  • Nicholas Wilcox
    Copy files from streamingassets in the project is part of regular Unity build process, it's nothing to do with FMOD. Have you checked the logs from your builds?
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.