Dedicated server builds on Unity

Hi, I was just wondering if the same is being done for the Unity integration:

When building using the “Dedicated Server” option, and then running, I get the following error:

Fallback handler could not load library [REDACTED]/Build/Server/Contents/Frameworks/MonoEmbedRuntime/osx/libfmodstudio
DllNotFoundException: fmodstudio assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) FMOD.Memory.FMOD5_Memory_GetStats(int&,int&,bool)
  at FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, System.Boolean blocking) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeUtils.EnforceLibraryOrder () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.StudioListener.OnEnable () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 

DllNotFoundException: fmodstudio assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) FMOD.Memory.FMOD5_Memory_GetStats(int&,int&,bool)
  at FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, System.Boolean blocking) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeUtils.EnforceLibraryOrder () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.StudioBankLoader.Start () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 

DllNotFoundException: fmodstudio assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) FMOD.Memory.FMOD5_Memory_GetStats(int&,int&,bool)
  at FMOD.Memory.GetStats (System.Int32& currentalloced, System.Int32& maxalloced, System.Boolean blocking) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeUtils.EnforceLibraryOrder () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeManager.get_Instance () [0x0007c] in <0efa03edb56042da9adc70753267a1f4>:0 
Rethrow as SystemNotInitializedException: [FMOD] Initialization failed
  at FMODUnity.RuntimeManager.get_Instance () [0x000af] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeManager.GetEventDescription (FMOD.GUID guid) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeManager.CreateInstance (FMOD.GUID guid) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at FMODUnity.RuntimeManager.CreateInstance (FMODUnity.EventReference eventReference) [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 
  at AudioPlayer.Start () [0x0001c] in <a8eac1b1f70a4f67bde4f2d774ba6da1>:0 

NullReferenceException: Object reference not set to an instance of an object
  at FMODUnity.RuntimeManager.Start () [0x00000] in <0efa03edb56042da9adc70753267a1f4>:0 

ERROR: Shader TextMeshPro/Sprite shader is not supported on this GPU (none of subshaders/fallbacks are suitable)

I think in this case, I can make use of the UNITY_SERVER condition to not call into the integration, but I was just wondering if the same is being done on the internally to block any rouge calls.

I can confirm we are not running the same check with Unity. Thanks for pointing it out - I’ve flagged this with the development team.

Thanks!

For our project, we created a separate assembly definition for server code such that the FMODUnity DLL doesn’t get built/included, though, the native plugins are still copied to the server build. Since no code path ever touches it, we just manually remove it in our build step.