4 ms·
Man it would be sweet to see Unity adopt CoreRT in .NET 5 and just drop all the C++ conversion nonsense. Edit: interesting, someone wrote about this a couple y
by lwansbrough 6y ago
Man it would be sweet to see Unity adopt CoreRT in .NET 5 and just drop all the C++ conversion nonsense.
Edit: interesting, someone wrote about this a couple years ago: https://xoofx.com/blog/2018/04/06/porting-unity-to-coreclr https://xoofx.com/blog/2018/04/06/porting-unity-to-coreclr
I wonder if there’s movement on this internally at Unity.
- jfkebwjsbx 6y agoWhy would it be "sweet"? There is no gain for the user.
- ClumsyPilot 6y agoI think the idea is to consolidate effort to a single C#-to-native path that is not proprietary. I agree the the Users of Unity may or not see gains in the short term
- reitzensteinm 6y agoI built a high end desktop after exclusively using desktops for a decade because Unity WebGL builds are so awful. It is the slowest, most opaque and buggiest build chain I have used since I made Flash games.
- lwansbrough 6y agoI expect it would replace the need for the burst compiler, and likely reduce the complexity of the job system (especially its need for special types.) There is also an observed performance gain switching from IL2CPP to CoreRT, which would be 100% free.
- pjmlp 6y agoWas that performance gain proven with benchmarks across all hardware platforms that Unity supports as deployment target?
- pjmlp 6y agoWhy should they, IL2CPP and Burst compilers is able to do C++ like optimizations that .NET is still far from being able to (they have actually two nowadays). .NET 5 also doesn't run in all platforms that Unity targets. Rich ecosystems only have to gain from multiple implementations.
- lwansbrough 6y ago> IL2CPP and Burst compilers is able to do C++ like optimizations that .NET is still far from being able to This is a discussion about .NET AOT (CoreRT) which has been observed to have a considerable performance benefit over IL2CPP/burst (see the attached blog post in my original comment) > .NET 5 also doesn't run in all platforms that Unity targets. CoreRT supports C++ codegen, so in the worst case you can use that. But its first class platform support is growing. Though I suspect even then you may see some platform support differences but those can be ironed out. Given the benefits of switching to .NET CoreRT I suspect it would be worthwhile.
- pjmlp 6y agoI doubt it, given that Burst does optimizations, with a constrained C# subset tailored for replacing lower Unity layers previously written in C++, and is already being used in production. CoreRT is still a preview tech that has to deal with the full capabilities of .NET Framework, including VB.NET, C#, F# and C++/CLI as generators of MSIL bytecode.