- Home /
What's the feasibility of using a native plugin for low-level memory management?
A couple years ago, I made a voxel engine in Unity, and I would like to revisit that idea, but one of my main concerns is memory. If I use C or C++, I can easily manage the memory of the voxel world. My thought process is that the native side would handle the storage, modification, and lookup of voxel data while the C# side would merely interface with the native side. But I also have concerns about invoking the native code from C#, because I recall that in the past, that was a major bottleneck when interfacing with native code.
Has that problem been circumvented somehow with Unity? I may want to do thousands of calls to the native interface in a single frame, and I wonder if it would be more performant to just write it all in C#, or if I would benefit from having the native interface.
Your answer
![](https://koobas.hobune.stream/wayback/20220613051634im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Low-level native plugins not working in 4.3 on Windows 3 Answers
DllNotFound when unmanaged c++ plugin library links to another unmanaged c++ library 1 Answer
Using DirectX 11 matrices in a native plugin 0 Answers
Native Rendering Plugin with UI Image 0 Answers
scan wifi using AndroidJavaObject 0 Answers