floatinghotpot / socket.io-unity

socket.io client for Unity, power game client with node.js back-end
494 stars 75 forks source link

Import DLL issue in Unity 2018.1.17 #40

Open dpnthanh opened 5 years ago

dpnthanh commented 5 years ago

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

LagacheLouis commented 5 years ago

@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.

bcjordan commented 5 years ago

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

bcjordan commented 5 years ago

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.

offchan42 commented 5 years ago

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 commented 5 years ago

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

AlekOstolle commented 5 years ago

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 ?

schematical commented 5 years ago

+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'

Rocher0724 commented 5 years ago

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