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

Error with latest Unity 2022.3.36f1 LTS + Mirror v89.10.4 + Ignorance 1.4.0 LTS Release 2 #88

Closed andrelevi closed 3 weeks ago

andrelevi commented 3 weeks ago

Hello, when trying Ignorance with the latest Unity LTS version and latest Mirror, I get this error:

Assets\Mirror\Runtime\Transports\Ignorance\Editor\Toolbox.cs(18,125): error CS0122: 'Native' is inaccessible due to its protection level

Any suggestions?

On my main project I've been using Unity 2019.4 + Ignorance for 5 years, which has worked quite well. If you're no longer interested in maintaining Ignorance, is there another transport you'd recommend I'd switch to? Ideally something with similar performance and reliable/unreliable UDP. Would you recommend KCP over ENet nowadays? It seems KCP does not support unreliable UDP though?

Thank you

image

SoftwareGuy commented 3 weeks ago

Hey there, thanks for bringing it to my attention.

That line is related to the RevealEnetLibraryName function in the Toolbox. I believe this error occurred when I updated the C# glue bindings. To remedy, comment out the RevealEnetLibraryName() block or I'll do a patch to that file to remove that editor-only option.

To answer your questions:

The KCP protocol is built upon UDP - the same socket layer that ENet/Ignorance is built on top of. I believe mischa did reimplement unreliable UDP into the KCP protocol but I can't vouch for its performance. Mirrors' KCP also runs in Unity Managed space vs ENet runs in the Native level.

I'm biased towards ENet (and well, my own transport) and I know KCP is used in big games like Genshin Impact for their networking facilities, so I guess this is kinda moot.

HTH.

SoftwareGuy commented 3 weeks ago

Patched in 9f95957fced1f5973a440193d705b0b715862f62.

andrelevi commented 3 weeks ago

Thanks for the info and comparison on KCP! Good to know.

And thanks for the patch, will try it out.