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.

Hi @Louis_FMOD ,
Any update on this? We are experiencing the same issue with playfab server.
Did the check in Unity was implemented ?

otherwise any idea to get this fixed in Playfab server (no audio support). Here is the error i’m getting:

DllNotFoundException: Unable to load DLL 'fmodstudio'. Tried the load the following dynamic libraries: Unable to load dynamic library 'fmodstudio' because of 'Failed to open the requested dynamic library (0x06000000) - The specified module could not be found.  (WinError:0000007e)

Unity 2022.3.17f1 and FMOD 2.02.20

Many thanks

A similar check for Unity has not been implemented yet, and is primarily intended for users who specifically want FMOD not to run on a dedicated server. Otherwise, given the lack of audio support, the FMOD system should initialize using the output FMOD_OUTPUTTYPE_NOSOUND, but based on your error it seems like your dedicated server build is lacking the FMOD libs full stop. Can you please confirm whether the FMOD libs are present?

Just to clarify, are you trying to have your dedicated server build run an FMOD system, or are you trying to have it not run FMOD at all?