Cannot import Voice2 into a project that uses Bolt

Hello!

I have a project that works great with Bolt but I am having issues adding Voice2 to it.
Just after importing the asset, I get around 100 errors that go away after removing PUN (as instructed here).

However, I get now 2 errors (which seem to be the same one):

PrecompiledAssemblyException: Multiple precompiled assemblies with the same name websocket-sharp.dll included for the current platform. Only one assembly with the same name is allowed per platform. Assembly path: {0}
UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.CreateTargetAssemblies (System.Collections.Generic.IEnumerable`1[T] customScriptAssemblies, System.Collections.Generic.IEnumerable`1[T] precompiledAssemblies) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:249)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.UpdateCustomTargetAssemblies () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:619)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.SetAllCustomScriptAssemblyJsons (System.String[] paths) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:728)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.SetAllCustomScriptAssemblyJsons (System.String[] allAssemblyJsons) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:217)

PrecompiledAssemblyException: Multiple precompiled assemblies with the same name websocket-sharp.dll included for the current platform. Only one assembly with the same name is allowed per platform. Assembly path: {0}
UnityEditor.Scripting.ScriptCompilation.EditorBuildRules.CreateTargetAssemblies (System.Collections.Generic.IEnumerable`1[T] customScriptAssemblies, System.Collections.Generic.IEnumerable`1[T] precompiledAssemblies) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorBuildRules.cs:249)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.UpdateCustomTargetAssemblies () (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:619)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.SetAllCustomScriptAssemblyJsons (System.String[] paths) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs:728)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.SetAllCustomScriptAssemblyJsons (System.String[] allAssemblyJsons) (at C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:217)
UnityEditor.Modules.ModuleManager:RegisterAdditionalUnityExtensions()

Could you point me in the right direction please?

Thank you!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2019
    hi @Opja,

    Thank you for choosing Photon!

    You need to delete one of the "websocket-sharp.dll".
    Probably delete the whole folder provided by Photon Voice 2: "Assets\Photon\PhotonLibs\WebSocket".

    I don't know where is the one provided by Bolt.
  • Hello!

    Thank you so much for your prompt response!

    Deleting "websocket-sharp.dll" from "Assets\Photon\PhotonLibs\WebSocket" throws this error:

    Assembly has reference to non-existent assembly 'PhotonUnityNetworking' (Assets/Photon/PhotonVoice/Code/PhotonVoice.asmdef)

    Deleting the whole folder throws this 3 errors:

    Assembly has reference to non-existent assembly 'PhotonWebSocket' (Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef)

    Assembly has reference to non-existent assembly 'PhotonUnityNetworking' (Assets/Photon/PhotonVoice/Code/PhotonVoice.asmdef)

    Assembly has reference to non-existent assembly 'PhotonWebSocket' (Assets/Photon/PhotonChat/Code/PhotonChat.asmdef)

    Probably there is still something I am missing?

    Thank you again!
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2019
    Hi @Opja,

    hmm I see.

    Where is the other "websocket-sharp.dll"?
    Does Bolt support Assembly Definitions as well? (asmdef)

    Bolt still use old LoadBalancingAPI
    LoadBalancingAPI use Photon3Unity3D.dll
    LoadBalancingAPI (and maybe Bolt) use the websocket-sharp.dll

    Photon Voice 2 use the new Photon Realtime
    Photon Voice 2 includes the new Photon Chat
    Photon Voice 2 includes PUN2
    PUN2 use the new Photon Realtime
    Photon Chat and Photon Realtime use Photon3Unity3D.dll and websocket-sharp.dll

    PUN1 (or PUN Classic) and LoadBalancingAPI have different project structure than PUN2 / Photon Voice 2.
    I think Bolt also uses the old project structure.
    Before we did put the libs under "Assets/Plugins" or "Assets//Plugins".
    In the new structure, it's either: "Assets/Photon/PhotonLibs" or "Assets/Photon/PhotonVoice/PhotonVoiceLibs".
    So there may be some duplicate stuff between the old and new libs folders.

    Photon Voice itself does not use websocket-sharp.dll since the only protocol we support on Photon Cloud is UDP and you could use TCP on self-hosted Photon Server.

    I have moved this discussion to Bolt category so my colleagues from the Bolt team can look into this.
  • Hello @Opja,

    As mentioned by @JohnTube, currently Photon Bolt uses a different version of Photon Realtime that is used by Voice 2/PUN 2, this causes the incompatibility.

    We are already working to make Photon Bolt fully compatible with the rest of the family, so there will be no issues using them in conjunction.