Open in0finite opened 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
Ok, so here are the steps to reproduce it:
dotnet publish -c Release
- you need to publish so you get all dependency DLLs in the same folder (which will also be .NET Standard 2.1 compatible)DemoFile\bin\Release\netstandard2.1\publish
to DemoFileNetUnityExample/Assets
Exception: LeavePvs on non-existent entity 176
DemoFile.DemoParser.OnPacketEntities (CSVCMsg_PacketEntities msg) (at <ec978e4798c440c88601902d9135d2e1>:0)
DemoFile.PacketEvents.ParseNetMessage (System.Int32 msgType, System.ReadOnlySpan`1[T] buf) (at <ec978e4798c440c88601902d9135d2e1>:0)
DemoFile.DemoParser.OnDemoPacket (CDemoPacket msg) (at <ec978e4798c440c88601902d9135d2e1>:0)
DemoFile.DemoEvents.ReadDemoCommand (EDemoCommands msgType, System.ReadOnlySpan`1[T] buffer) (at <ec978e4798c440c88601902d9135d2e1>:0)
DemoFile.DemoParser.MoveNextAsync (System.Threading.CancellationToken cancellationToken) (at <ec978e4798c440c88601902d9135d2e1>:0)
Let me know if you need help.
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 ?