Page 1 of 1

WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 28 Jun 2019, 17:29
by AndyMartin458
I am working on upgrading to 'Unity 2018.4.2'. Unity has made it a requirement to use a separate plugin for Substance textures. This plugin imports websocketsharp and is causing issues in my project. Would it be possible for you to make the declaration of the WebSocketSharp code internal to the sfs2x dll? Or optionally if you made its namespace SFS.WebSocketSharp then I would also be able to avoid the issue.

Assets\Allegorithmic\Plugins\Substance\Livelink\Editor\Scripts\MeshLinkEditor.cs(21,33): error CS0433: The type 'WebSocket' exists in both 'SmartFox2X, Version=1.7.12.0, Culture=neutral, PublicKeyToken=null' and 'websocket-sharp, Version=1.0.2.29661, Culture=neutral, PublicKeyToken=5660b08a1845a91e'

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 08:24
by Bax
That's kind of an issue. Changing all the classes to internal means we need to edit 80 files.
And in case we need to update the library in the future, we have to do it over again.
What I don't get is why a texture plugin needs WebSocketSharp.

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 08:50
by Bax
This could be something to explore: https://blogs.msdn.microsoft.com/ansonh ... lkthrough/

The problem is that we are not referencing the WebSocketSharp DLL in our API. We just included the source code in our own source code.
You may ask the plugin developer to use the extern alias approach (unless they are doing the same we do).

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 10:11
by Bax
Anyway, if the plugin developers can't help, we'll make the change to the WSSharp code in our source files.

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 15:42
by AndyMartin458
I'll look at the link. I did also post something for the plugin developers to look at. https://forum.substance3d.com/index.php?topic=29625.0

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 15:44
by Bax
Thanks. Let us know how it goes. As I said, if needed we will help to fix this issue.

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 01 Jul 2019, 16:19
by AndyMartin458
Hi Paolo,

I have a thread going on their end, but they haven't responded yet https://forum.substance3d.com/index.php ... 625.0.html They appear to be using WebSocketSharp for some remote interface to edit textures. I'm not quite sure. They are bringing in the file as a .dll and manually loading it, so I wasn't able to figure out how to modify it with extern alias. I tried.

If you were able to make a change on your end, that would be great!

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 02 Jul 2019, 14:04
by Bax
Please contact us by email.
We can provide a test release with a modified namespace of the WebSocketSharp library we use internally.

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 02 Jul 2019, 14:22
by AndyMartin458
Sent an email. Thanks!

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 02 Jul 2019, 15:36
by AndyMartin458
The new plugin works great! But, the Allegorithmic Substance plugin seems to have other issues now. Think I'm going to remove it and use Substance Player to bake out all the textures that were relying on the editor plugin.

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 06 Dec 2022, 07:16
by quanarmy
Bax wrote:Please contact us by email.
We can provide a test release with a modified namespace of the WebSocketSharp library we use internally.
Hi, can you send me this version. I'm working with smartfox and Unity Multiplay 1.0.0-pre.6. But it's has the same problem.

Code: Select all

Library\PackageCache\com.unity.services.multiplay@1.0.0-pre.6\Runtime\EmbedWire\WebSocket.cs(427,34): error CS0433: The type 'WebSocket' exists in both 'SmartFox2X, Version=1.17.7.0, Culture=neutral, PublicKeyToken=null' and 'websocket-sharp, Version=1.0.2.18559, Culture=neutral, PublicKeyToken=5660b08a1845a91e'

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 06 Dec 2022, 09:20
by Lapo
quanarmy wrote: Hi, can you send me this version. I'm working with smartfox and Unity Multiplay 1.0.0-pre.6. But it's has the same problem.
Please get in touch with us directly via our support@... email box.

Thanks

Re: WebSocketSharp Conflict. Could it be internal instead of public?

Posted: 06 Dec 2022, 09:54
by quanarmy
Lapo wrote:
quanarmy wrote: Hi, can you send me this version. I'm working with smartfox and Unity Multiplay 1.0.0-pre.6. But it's has the same problem.
Please get in touch with us directly via our support@... email box.

Thanks
Thanks for quick response! I have sent email.