cancel
Showing results for 
Search instead for 
Did you mean: 

Error on Building to WebGL - Colliding Plugins?

gj-22
Honored Guest

 

Hello, Meta forums! My team is dealing with an issue regarding building to webGL with a Unity project that includes the Oculus Meta All-In-One package. Specifically, whenever we try to build to WebGL, we receive this error:

 

Plugin 'InteractionSdk.dll' is used from several locations:
 Packages/com.meta.xr.sdk.interaction/Runtime/Plugins/Win64/InteractionSdk.dll would be copied to <PluginPath>/InteractionSdk.dll
 Packages/com.meta.xr.sdk.interaction/Runtime/Plugins/Win32/InteractionSdk.dll would be copied to <PluginPath>/InteractionSdk.dll
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions (string,string[])
UnityEditorInternal.PluginsHelper:CheckFileCollisions (UnityEditor.BuildTarget,string[])
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Plugins colliding with each other.

 

We're not sure why this duplication is happening. We found that removing the dll file from the Win32 folder prevents this error, but we consider this a band-aid solution that we'd have to do each build. Since the dlls are managed by the UPM, we're unable to modify the import settings to exclude them for the WebGL platform ourselves. Are there any configuration settings or other solutions we could use to solve this?


Important note: we aren't trying to implement VR in WebGL. However, our project does have a WebGL build and would like to maintain this build on the same branch, if possible.

3 REPLIES 3

sollaholla
Honored Guest

Same problem. Seems like a significant oversight. This prevents us from building our project and can't be modified since it's UPM. Please fix Meta.

sollaholla
Honored Guest

Temporary fix for any onlookers:

public class MetaInteractionSdk6DuplicateDllsFix : IPreprocessBuildWithReport
{
public int callbackOrder { get; } = int.MaxValue;

public void OnPreprocessBuild(BuildReport report)
{
const string dir = @"Library\PackageCache\com.meta.xr.sdk.interaction@60.0.0\Runtime\Plugins\Win32";
if (!Directory.Exists(dir)) return;
Directory.Delete(dir, true);
}
}


All they'd have to do is modify a simple dropdown from "AnyCPU" to "x86." Knowing that this will get buried though I want to help those who will inevitably hit this wall. 

ryan-at-melcher
Protege

Thanks for the code, @sollaholla! You helped me during a pinch.