wrld3d / unity-api

Issue tracking for the WRLD Unity SDK
28 stars 8 forks source link

[ SUGGESTION ] GC Allocations #111

Open PrisedRabbit opened 3 years ago

PrisedRabbit commented 3 years ago

Pls add the fix:

image

And is it possible to avoid of Marshal.PtrToStringAnsi() because of GC Allocations?

ghost commented 3 years ago

CalculateLookAt() should only be called once per frame, unless you are calling it yourself for some reason so it's unlikely to be a performance bottleneck. Do you have some profiling data that this is causing performance issues in your app?

Unfortunately in our current architecture we rely on passing strings to our C++ platform library which requires converting them to C Strings.