# FMOD Studio integration liveupdate cannot connect with Unity 5 Beta.

**URL:** https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799
**Category:** Unity
**Created:** [January 16, 2015, 11:26am UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799 "2015-01-16T11:26:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![stunlock](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@stunlock](https://qa.fmod.com/u/stunlock)
#### Post date: [January 16, 2015, 11:26am UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799/1 "2015-01-16T11:26:16Z")

</div>

I am using FMOD Studio-, API- and Unity integration 1.05.10 together with Unity 5 Beta 20, and everything seems to be working as intended so far except for liveupdate. I have added the FMOD\_LIVEUPDATE and FMOD\_DEBUG flags to scripting define symbols, and in Unity I get these warnings:

FMOD Error (ERR\_NET\_SOCKET\_ERROR): A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.  
UnityEngine.Debug:LogWarning(Object)  
FMOD.Studio.UnityUtil:LogWarning(String)  
(at Assets/Plugins/FMOD/FMOD\_StudioSystem.cs:53)  
FMOD.Studio.UnityUtil:ERRCHECK(RESULT)  
(at Assets/Plugins/FMOD/FMOD\_StudioSystem.cs:120)  
FMOD\_StudioSystem:ERRCHECK(RESULT)  
(at Assets/Plugins/FMOD/FMOD\_StudioSystem.cs:357)  
FMOD\_StudioSystem:Update() (at Assets/Plugins/FMOD/FMOD\_StudioSystem.cs:337)

When trying to connect I get this pop-up from Studio:  
“Studio could not connect to “127.0.0.1”. Please check that the IP address is correct, the  
game is running and live update is enabled.”

There is no firewall in the way that could stop any connection either.

I have tried using the same Unity integration package with Unity 4.6, and liveupdate connects immediately, syncing changes in the editor perfectly with the game. Is liveupdate not yet supported for the Unity 5 Beta, or is there something awry with either the FMOD integration, or on Unitys side of things?

---

<div class="post-metadata">

### Author: ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)
#### Post date: [January 18, 2015, 11:40pm UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799/2 "2015-01-18T23:40:01Z")

</div>

Unity 5 has opened up a separate listener on our default live update port.

Add this code after line 258 of FMOD\_StudioSystem.cpp

```
    // Unity 5 liveupdate workaround
    if (Application.unityVersion.StartsWith("5"))
    {
        FMOD.Studio.UnityUtil.LogWarning("FMOD_StudioSystem: detected Unity 5, running on port 9265");
        FMOD.System sys;
        ERRCHECK(system.getLowLevelSystem(out sys));
        FMOD.ADVANCEDSETTINGS advancedSettings = new FMOD.ADVANCEDSETTINGS();
        advancedSettings.profilePort = 9265;
        ERRCHECK(sys.setAdvancedSettings(ref advancedSettings));
    }

```

You’ll need version 1.05.10 or later of the tool, and then in the connect to game dialog enter the address as host:port, e.g. “127.0.0.1:9265”

---

<div class="post-metadata">

### Author: ![endnight](https://avatars.discourse-cdn.com/v4/letter/e/90ced4/32.png) [@endnight](https://qa.fmod.com/u/endnight)
#### Post date: [April 29, 2015, 2:22am UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799/3 "2015-04-29T02:22:32Z")

</div>

> [@](#):
>
> Unity 5 has opened up a separate listener on our default live update port.
> 
> Add this code after line 258 of FMOD\_StudioSystem.cpp
> 
> ```
> // Unity 5 liveupdate workaround
> if (Application.unityVersion.StartsWith("5"))
> {
> FMOD.Studio.UnityUtil.LogWarning("FMOD_StudioSystem: detected Unity 5, running on port 9265");
> FMOD.System sys;
> ERRCHECK(system.getLowLevelSystem(out sys));
> FMOD.ADVANCEDSETTINGS advancedSettings = new FMOD.ADVANCEDSETTINGS();
> advancedSettings.profilePort = 9265;
> ERRCHECK(sys.setAdvancedSettings(ref advancedSettings));
> }
> 
> ```
> 
> You’ll need version 1.05.10 or later of the tool, and then in the connect to game dialog enter the address as host:port, e.g. “127.0.0.1:9265”

Thanks - I just ran into this problem, and this fixed it. The system works!

---

<div class="post-metadata">

### Author: ![stunlock](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@stunlock](https://qa.fmod.com/u/stunlock)
#### Post date: [April 29, 2015, 7:06am UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799/4 "2015-04-29T07:06:11Z")

</div>

Thank you Nicholas, that did the trick, works perfectly!

---

<div class="post-metadata">

### Author: ![albertocarlassare](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@albertocarlassare](https://qa.fmod.com/u/albertocarlassare)
#### Post date: [October 30, 2015, 5:16pm UTC](https://qa.fmod.com/t/fmod-studio-integration-liveupdate-cannot-connect-with-unity-5-beta/11799/5 "2015-10-30T17:16:37Z")

</div>

Hi! If I copy paste this code into line 258 (inside void Init() ) ; Unity give me back console error: ‘sys’ and ‘advancedSettings’ cannot be delcared in this scope because it would give a different meaning to ‘advancedSettings’, which is already used in a child scope.

If I change sys for syst and advancedSettings to advancedSetting (just to don’t duplicate that vars) the game run but I still can’t connet FMOD to Unity.

What can I do?
