WebSocketSharp Conflict. Could it be internal instead of public?

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

WebSocketSharp Conflict. Could it be internal instead of public?

Post 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'
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

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

Post 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.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

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

Post 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).
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

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

Post by Bax »

Anyway, if the plugin developers can't help, we'll make the change to the WSSharp code in our source files.
Paolo Bax
The SmartFoxServer Team
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

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

Post 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
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

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

Post by Bax »

Thanks. Let us know how it goes. As I said, if needed we will help to fix this issue.
Paolo Bax
The SmartFoxServer Team
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

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

Post 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!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

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

Post by Bax »

Please contact us by email.
We can provide a test release with a modified namespace of the WebSocketSharp library we use internally.
Paolo Bax
The SmartFoxServer Team
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

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

Post by AndyMartin458 »

Sent an email. Thanks!
AndyMartin458
Posts: 55
Joined: 15 May 2012, 21:57

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

Post 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.
User avatar
quanarmy
Posts: 2
Joined: 06 Dec 2022, 07:08

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

Post 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'
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
quanarmy
Posts: 2
Joined: 06 Dec 2022, 07:08

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

Post 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.
Post Reply