SoftwareGuy / Ignorance

Ignorance utilizes the power of ENet to provide a reliable UDP networking transport for Mirror Networking.
Other
248 stars 31 forks source link

[Ignorance 1.3.9 Prerelease Revision 1] IgnoranceClassic.cs, IgnoranceThreaded.cs errors on import #72

Closed lou34673723 closed 3 years ago

lou34673723 commented 3 years ago

Versions:

Mirror Version 26.2.2 Ignorance 1.3.9 Prerelease Revision 1 Unity3D 2020.1.12f1 OS: Windows 7 64bit

Issue:

I installed Mirror Version 26.2.2 first; restarted Unity3D, then imported Ignorance and got these 6 errors (and 2 warnings):

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceClassic.cs(147,30): error CS0508: 'IgnoranceClassic.ClientSend(int, ArraySegment)': return type must be 'void' to match overridden member 'Transport.ClientSend(int, ArraySegment)'

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceClassic.cs(187,21): warning CS0114: 'IgnoranceClassic.ServerSend(int, int, ArraySegment)' hides inherited member 'Transport.ServerSend(int, int, ArraySegment)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceClassic.cs(604,30): error CS0115: 'IgnoranceClassic.ServerSend(List, int, ArraySegment)': no suitable method found to override

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceClassic.cs(25,18): error CS0534: 'IgnoranceClassic' does not implement inherited abstract member 'Transport.ServerSend(int, int, ArraySegment)'

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(236,30): error CS0508: 'IgnoranceThreaded.ClientSend(int, ArraySegment)': return type must be 'void' to match overridden member 'Transport.ClientSend(int, ArraySegment)'

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(275,21): warning CS0114: 'IgnoranceThreaded.ServerSend(int, int, ArraySegment)' hides inherited member 'Transport.ServerSend(int, int, ArraySegment)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(788,30): error CS0115: 'IgnoranceThreaded.ServerSend(List, int, ArraySegment)': no suitable method found to override

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(31,18): error CS0534: 'IgnoranceThreaded' does not implement inherited abstract member 'Transport.ServerSend(int, int, ArraySegment)'

SoftwareGuy commented 3 years ago

This is fixed in the latest commits of Ignorance. What I encourage you to do is clone the repository or download it as a ZIP, remove the Ignorance folder under Assets/Mirror/Runtime/Transport and then copy the repositories' Ignorance folder to that Transport folder path previously mentioned.

Mirror 23 and 26 support will be available in the official release of Ignorance 1.3.10, but right now, this is the manual workaround.

SoftwareGuy commented 3 years ago

Fixed as of 1.3.9.2. Closing.

RuudvanReenen commented 3 years ago

Ignorance 1.3.9.2 Mirror 30.2.2 Unity3D 2018.4.22f1 OS: Win 10 x64

With Build Platform: PC, Mac & Linux Standalone I'm getting the following errors:

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(227,30): error CS0508: 'IgnoranceThreaded.ClientSend(int, ArraySegment<byte>)': return type must be 'void' to match overridden member 'Transport.ClientSend(int, ArraySegment<byte>)'

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(298,30): error CS0115: 'IgnoranceThreaded.ServerSend(List<int>, int, ArraySegment<byte>)': no suitable method found to override

Assets\Mirror\Runtime\Transport\Ignorance\IgnoranceThreaded.cs(28,18): error CS0534: 'IgnoranceThreaded' does not implement inherited abstract member 'Transport.ServerSend(int, int, ArraySegment<byte>)'

No errors showing when Build Platform is Android. I've also tried the workaround above with the Transport from the repository (Nov 18th, 2020) but this gives the same errors (probably the same files as 1.3.9.2 now?).

Any idea how to fix this? Is Ignorance not compatible yet with Mirror 30.2.2 (current Mirror version on Asset Store)?

SoftwareGuy commented 3 years ago

Ignorance has been compatible with latest Mirror for ages.

Define "MIRROR_26_OR_NEWER" in your compile flags, most likely when you switch platform they got nerfed.

RuudvanReenen commented 3 years ago

Thanks a lot! That solved the issue.