Running BepuPhysis in Unity With NativeAOT Interlop #331
sayiliromer
started this conversation in
Show and tell
Replies: 1 comment
-
Should be full performance if nativeaot is allowed to use AVX2, yup! Notably, there is a still-incomplete C API of this sort over in the abomination interop project, plus a partial C++ wrapper: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Along with Unity users, i beleive running BepuPhysics inside Unit was a dream.
NativeAOT allows you to expose functions to unmanaged callers. So those functions can be called from any platforms that supports C interlops.
Here is a basic example by Mircosoft. https://github.com/dotnet/samples/tree/main/core/nativeaot/NativeLibrary
What i did is, i exposed some basic functions by wraping some BepuPhysics APIs.
I haven't done a performance comparison but i can tell it is reasonably good. Feels close to C# JIT version.
You can find a video of BepuPhysics runnind inside Unity at full speed.
Also, i included an example code if you want to try something similar.
Beta Was this translation helpful? Give feedback.
All reactions