socket.io-unity icon indicating copy to clipboard operation
socket.io-unity copied to clipboard

Import DLL issue in Unity 2018.1.17

Open dpnthanh opened this issue 5 years ago • 8 comments

I'm try to import dll file to Plugins folder, affter that unity show 31 error like this error CS0433: The imported type `System.Func<T1,T2,TResult>' is defined multiple times

dpnthanh avatar Dec 06 '18 09:12 dpnthanh

@dpnthanh Unity 2018 package manager ui is the source of this issue ,you can remove it's dependancy in your project in "yourproject"/Packages/manifest.json. It will resolve the conflict but package will be no more accessible.

LagacheLouis avatar Dec 08 '18 21:12 LagacheLouis

Does that mean there's no way to use this with 2018 now?

bcjordan avatar Jan 19 '19 11:01 bcjordan

If anyone's doing the same thing, ^ see that commit's editing of the Unity Packages/manifest.json. It doesn't remove package manager ability, just the UI.

bcjordan avatar Jan 19 '19 14:01 bcjordan

I can confirm this issue is still happening in Unity 2019.2.2f1 image

E:\Unity\2019.2.2f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Layout\LayoutUtility.cs(148,74): error CS0433: The type 'Func<T, TResult>' exists in both 'WebSocket4Net, Version=0.14.1.0, Culture=neutral, PublicKeyToken=eb4e154b696bf72a' and 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' What is a smart solution for this problem? I want to use socket.io in Unity. Is there an alternative repo or method? @floatinghotpot Can you help fix the issue? It's also the same issue as #37, #33, #35, #1 If you fix this one, many issues will be closed. Thank you. If the issues seem to be too difficult to fix please also suggest an alternative for communicating unity with other languages (high-level way).

offchan42 avatar Aug 29 '19 18:08 offchan42

I am now using BestHTTP package on the Unity asset store as a solution. It has socket.io implementation.

offchan42 avatar Sep 02 '19 00:09 offchan42

I have the same problem. " error CS0433: The type 'Func<T, TResult>' exists in both 'WebSocket4Net, Version=0.14.1.0, Culture=neutral, PublicKeyToken=eb4e154b696bf72a' and 'netstandard, Version=2.0.0.0 " May someone have a solution ?

AlekOstolle avatar Oct 18 '19 07:10 AlekOstolle

+1 same error /home/user1a/Unity-2019.1.0f2/Editor/2019.2.10f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Layout/LayoutUtility.cs(148,74): error CS0433: The type 'Func<T, TResult>' exists in both 'WebSocket4Net, Version=0.14.1.0, Culture=neutral, PublicKeyToken=eb4e154b696bf72a' and 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

schematical avatar Oct 30 '19 15:10 schematical

Hi there.

i am changed this library dll file to c-sharp code for use with Unity 2019.1.12f, .NET 4.x.

The reason I changed the DLL file to C-Sharp code was because I wanted to use the Func and Action functions.

try it

https://github.com/rocher0724/socket.io-unity

Rocher0724 avatar Nov 04 '19 01:11 Rocher0724