For anyone craving some more modern .NET features in Unity, it seems that Unity 6 (potentially Unity 2023 too, I have not checked there) has undocumented support for UnmanagedCallersOnly in both Mono and IL2CPP. You just need to define the attribute yourself, in the appropriate namespace (i.e., by copying this file into your project). Once you have the attribute available, it works just fine:
Unfortunately, I can’t provide an answer to that just yet. As mentioned earlier, it’s unlikely we’ll have an update to share before the end of the year. We appreciate your patience in the meantime
The goal is to stay up-to-date with the latest .NET version. We’ve made significant efforts to standardize our .NET runtime integration. Though, aligning .NET’s STS and LTS release cycles with Unity’s release schedule brings some challenges. There may be cases where the latest .NET runtime version isn’t available in a subsequent minor Unity release (e.g. because it could break things) - but we’ll navigate these situations when we can evaluate them better. Overall, this new approach should greatly improve the experience compared to what we have today.
@huntermig123456 I could be wrong, and if so, I would love to be corrected.
But I don’t think they have stated that anywhere.
We have just been assuming that to be the case.
There is absolutely no reason to believe that. Hell, right now they’re going to try to make it easier for you to use URP and HDRP in the same project. Throwing away their only feature-stable pipeline would be a move almost as questionable as charging a runtime-fee.
Edit: nevermind, apparently I completely missed this. Which is odd, considering I check the roadmaps weekly…
The Unity 6 generation is the last for BiRP. This is not unexpected and doesn’t compare to the runtime fee. The next generation of Unity will be a chance to get rid of the old systems, and if you’re not comfortable with any of that then Unity 6 has been designed to be supported long into the future.
This isn’t particularly on-topic for this thread, so if you do have replies to this please use the Unified Rendering thread.
Ugh… I know I responded cynically but I have to confess, the more I think about it, the more I am glad that we are finally getting a unified solution again. The whole render-split has been such a mess for asset store- and game developers alike. The conversion is gonna hurt and that annoys me, but I can recognize that the change is for the better and even though nobody asked I wanted to express that I was wrong and say stupid shit sometimes.
Will Unity support modern .NET Native Memory without issues on major platforms? Modern C# Native Memory offers incredible performance; when used with structs, pointers, and parallel loops, it performs very close to C++. It’s not hard to work with and provides an alternative to ECS and other performance-oriented systems. Personally, I love it and find it easy to use. In theory, Unity should support it when modern .NET becomes available, but I’m asking because I’m concerned it might not, as I already have thousands of lines of code using it as a separately compiled DLL.
I thought that was a new blog entry… so when is a guide on best practices and future proofing our projects for this CoreCLR stuff… things that we can do now so we don’t have a major headache later updating things in Unity 7 whenever that comes out…
It is evident that in a .NET environment, it can be used without issues, but the potential problem I’m asking about is when it is compiled in IL2CPP for consoles. Specifically, I’m referring to (double*)NativeMemory.AllocZeroed compiled in IL2CPP. My question is about compatibility. Using structures in NativeMemory and parallel loops outperforms DOTS in terms of performance. I’ve tested it thoroughly. There is nothing faster than directly managing memory. Once you get used to it, it’s a valid, straightforward approach and a way to develop.