CoreCLR Discussion Thread - Unity 6.7 Alpha #5546
Replies: 3 comments 5 replies
|
Would definitely be a nice upgrade in the plugin development department, I think the biggest pro being that we can use the latest Entity Framework library which is an SQL wrapper (ORM). Most modern .NET 10 libraries can already be loaded with some work if they have a netstandard2.X target, which most do like System.Text.Json or any of the Microsoft.Extensions libraries. Also most of the missing language features can be brought back with Polyfills such as PolySharp. On the other hand, this will break a ton of plugins. Any plugin built for .NET Framework, which is most of them out there, will not load without a few minor changes and a rebuild. Also, @Trojaner will probably have some thoughts on this re. the ImperialPlugins loader. As much as it pains me to say I don't think its worth upgrading any time soon unless the performance gain is actually very noticeable. Another alternative could be keeping two branches for U3DS: Mono and CoreCLR which could allow server hosts to use older plugins but those that want to upgrade or have a performance boost can use the CoreCLR build. |
|
This would break the ImperialPlugins native loader and hence all plugins on ImperialPlugins.com. Given the fundamental architectural differences to mono, it's not clear if it could ever be ported to .NET CoreCLR at all. Even if it could be ported, it's not clear if all plugins on ImperialPlugins would remain compatible with it (even under mono some plugins are not compatible and break, hence they were written in a way that they work with the native loader). A simple claim like ".NET 10 works with plugins and modules" requires rigorous and sophisticated testing on various platforms, including various Linux distributions with more than a few older major releases for each of them, all Windows versions up to Windows Server 2012 as well as recent macOS releases and of course this would need to be done with a large and representative amount of plugins (of which a big chunk is not available freely and where some are even completely private). Honestly I don't see .NET Framework being that relevant when it comes to limitations plugin developers face. RocketMod's architectural decisions have always had a much bigger impact there. |
|
I don't see a reason to halt the game progression because someone's business based on shipping plugins made for indie game will have downtime or will get completely obsolete after nearly idk? A decade? Separate branch would be good for testing ahead (public repo will be enough aswell), announce the date the full change will (IF) happen officially and lets goo. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone, I figured I'd make a more formal GitHub thread for discussing Unturned in terms of upgrading its runtime to CoreCLR when Unity 6.8 comes out.
As many of you have seen, Unity released a "Path to CoreCLR, 2026" discussion post with some details on experimenting with CoreCLR in Unity 6.7a2. There are some specific things that broke due to .NET modernization, but it is about three individual issues with the U3-SDK code that can be easily resolved.
This week, I went ahead and upgraded the U3-SDK Unity project to 6.7a2 and set the scripting to be CoreCLR. Upon fixing some slight issues with libraries and Unity phasing out instance IDs, it works like a charm. The U3-SDK runs exactly like you'd expect on the Mono runtime with CoreCLR.
So, I wanted to mention what I've figured out so far:
Debugger.Launch()will allow you to use the Visual Studio debugger. This is incredibly useful for looking at local values and setting up breakpoints.I don't necessarily think that the path to switching to Unity 6.8 should be a PR submitted by someone, but rather SDG voluntarily upgrading it when it becomes viable. With that being said, it seems that the upgrade should be smooth in terms of the vanilla game and the main quirks will probably come out of the nature of it being an engine upgrade.
Debugger prompt being triggered in the CoreCLR build:

If some people have some thoughts, suggestions for use cases, and other information on the .NET modernization, please feel free to add to this post.
All reactions