ProjectAcoustics icon indicating copy to clipboard operation
ProjectAcoustics copied to clipboard

switching platform to WebGL

Open bouiz opened this issue 3 years ago • 3 comments

Hello,

I am trying to publish a game on a website (through unity webGL), but I am having trouble switching platforms between PC and WebGL. I started looking into the compile errors to see if I can adapt the scripts but to be honest, I have no idea how to do it. Do you think there is a way that Project acoustics could run on a webGL platform ?

Thanks a lot Taha

bouiz avatar May 11 '21 18:05 bouiz

Hi @bouiz , I'm not familiar with how to target WebGL. In theory it should be possible, but we don't have built-in support at this time. Does it look like there are lots of little issues, or is the whole thing just not working? Maybe sharing the error logs will shed some light on the scope of the issue.

MikeChemi avatar May 11 '21 22:05 MikeChemi

Hi @MikeChemi ,

Thank you for your reply

Here are the error logs i get when launching it on webGL :

`DllNotFoundException AcousticsInterop..ctor (System.Boolean debug) (at Assets/Acoustics/Scripts/AcousticsInterop.cs:13) AcousticsInterop..ctor (System.Boolean debug, System.String filename) (at Assets/Acoustics/Scripts/AcousticsInterop.cs:21) AcousticsManager.InitAcoustics () (at Assets/Acoustics/Scripts/AcousticsManager.cs:73) AcousticsManager.OnEnable () (at Assets/Acoustics/Scripts/AcousticsManager.cs:214)

NullReferenceException: Object reference not set to an instance of an object AcousticsManager.UpdateProbesForGizmo () (at Assets/Acoustics/Scripts/AcousticsManager.cs:157) AcousticsManager.Update () (at Assets/Acoustics/Scripts/AcousticsManager.cs:254)

DllNotFoundException AcousticsManager.OnDrawGizmos () (at Assets/Acoustics/Scripts/AcousticsManager.cs:319) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

NullReferenceException: Object reference not set to an instance of an object AcousticsManager.OnDisable () (at Assets/Acoustics/Scripts/AcousticsManager.cs:207) `

bouiz avatar May 16 '21 09:05 bouiz

This looks like the Project Acoustics native plugins did not get deployed for WebGL. I don't know how that's all supposed to work, but I would start looking at plugin deployment to see if the Unity manual has any instructions.

I took a quick look myself and stumbled on this page. https://docs.unity3d.com/Manual/webgl-audio.html Specifically, this text: "Unfortunately, this limits audio functionality in Unity WebGL to supporting only the most basic features. This page will document what is expected to work. Anything not listed here is not currently supported on WebGL."

Project Acoustics relies on an audio plugin to Unity's internal FMOD implementation. Since Unity is not using FMOD for WebGL, there's a high likely-hood that Project Acoustics is not supported

MikeChemi avatar May 17 '21 15:05 MikeChemi

Closing since Unity still claims no plugin support for WebGL, which is a requirement for Project Acoustics to work.

MikeChemi avatar Nov 18 '22 17:11 MikeChemi