saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

Unity engine support #36

Open in0finite opened 10 months ago

in0finite commented 10 months ago

Currently I am doing a lot of struggle to marshal data into Unity from external .NET process or external WebAssembly module.

It would be much better if this library would support Unity engine by default.

As you may know, Unity supports only up to .NET 4.8 or .NET Standard 2.1, see docs.

I managed to compile library to .NET Standard 2.1, which runs fine in .NET 7 executable, but gives some weird errors in Unity, like InvalidProtocolBufferException. Then there is Unity's custom AOT solution (called IL2CPP) which I haven't even tried to run with.

What do you think about it ?

saul commented 10 months ago

A full exception could be useful for pinning down exactly what's going on here.

Is there a simple way to reproduce this in Unity? I have no familiarity with it

in0finite commented 9 months ago

Ok, so here are the steps to reproduce it:

Compile library to .NET Standard 2.1

Unity

Let me know if you need help.