3 ms·
In Unity you often use C# for some fairly performance critical stuff. That's one of the reasons they bothered with the Burst compiler, the Jobs system and nativ
by andybak 3y ago
In Unity you often use C# for some fairly performance critical stuff. That's one of the reasons they bothered with the Burst compiler, the Jobs system and native arrays.
- lewispollard 3y agoWell, Unity is a good example of this, because most of their techniques involve transforming your C# code or assembly into something else that doesn't run on the .NET runtime, or else having you structure it so that it can be offloaded - directly into C++ code in IL2CPP, or using LLVM to turn the IL bytecode into machine code with Burst. I don't know much about the Jobs/DOTS stuff but I assume the restrictions around it and how you use it are either due to it being based on a strict call-out to C++ code, or else some underlying "unsafe" C# code that Unity is managing safety around via structure - from a little reading it sounds like probably both.