FMOD_LIVEUPDATE and line endings in Monodevelop

I’m working with a group of students at my university on FMOD and Unity integration. All of us are getting different results with FMOD_LIVEUPDATE. After adding the required code to instantiate this feature, Monodevelop displays the following message:

Some members of the class chose “Convert” others chose “Keep line endings.” Either way, they can’t get liveupdate to work correctly. The strange thing is, I was able to get it to work on my own and when I share this file with my students it works for them as well.

It seems there is something particular about the formatting of the .cs file but I can’t see what it is. Any suggestions?

You don’t need to modify any code files to enable Live Update, just go to Edit -> Project Settings -> Player, and add FMOD_LIVEUPDATE to the Scripting Define Symbols. It has to be defined for both FMOD_Listener and FMOD_StudioSystem, I suspect the reason some of them are having trouble is because they have defined it in one file and not the other.

Peter,

Thanks for your advice. I can confirm that the correct scripts are in both FMOD_Listener and FMOD_StudioSystem with the same results: it works for some but not for all. What’s interesting is that NONE of the Unity projects have FMOD_LIVEUPDATE in the Scripting Define Symbols. I will look into this, but it won’t explain why this call isn’t necessary in the files with a functional LIVEUPDATE.

Any other thoughts?

The reason it’s defined in two places is because there are two things you need to do.

(1) Pass the FMOD_INIT_LIVEUPDATE flag to FMOD.Studio.System.Initialize
(in FMOD_StudioSystem.cs)
(2) Set: Application.runInBackground = true
(in FMOD_Listener.cs)

If you miss point 2, then Unity wont be updating when the editor loses focus. This means the only way to connect would be to switch back to Unity within the 3 second window between clicking connect and the error dialog saying that connection failed.

If your issue isn’t explained by that then it is likely to be an issue specific to the way the university computers are configured. It’s not uncommon for there to be very restrictive permissions on university systems, so if you cannot connect to the loopback port (127.0.0.1) it may be a permission issue.

Peter, this all makes sense and I’ve tried your suggestions. Still, I have inconsistent performance with files that seem identical to me: one works; one doesn’t, and the addition of FMOD_LIVEUPDATE in the Scripting Define Symbols field has no effect.

Here is a Dropbox link with two zipped folders, FMOD and Unity projects are included:

Perhaps seeing these will reveal what’s going wrong.