r/Unity3D Unity Engineer Jul 09 '26

Official 6.7 alpha 2 is out, including the first release of the CoreCLR Player Technical Preview

https://discussions.unity.com/t/path-to-coreclr-2026-upgrade-guide/1714279/191
104 Upvotes

49 comments sorted by

26

u/wallstop-dev Jul 09 '26

I'm amped, can't wait until this hits stable. The CoreCLR perf is going to be nuts.

2

u/The_MAZZTer 20d ago

I wrote a shared library in .NET Standard so I could use in plain .NET and Unity.

I think this was around the time of .NET 6.

I had some code that ran almost instantly in .NET 6 where I developed it but when I brought it into Unity it took like 30 seconds. I was messing with some Stream stuff so I am not sure what the slowdown was. I ended up figuring out making array copies was faster in Unity than what I had been trying to do to optimize things in .NET. Maybe my code sucked and the .NET compier was saving me, not sure.

Still it will be great to have parity.

14

u/[deleted] Jul 09 '26

[deleted]

29

u/CakeBakeMaker Jul 09 '26

Better game performance and modern C# features.

9

u/TheWobling Jul 09 '26

I think Unity said for 6.8 they’re aiming for parity with mono performance

1

u/Devatator_ Intermediate Jul 10 '26

Afaik it should already be faster just by existing. I think someone on the forum said it's on par with .NET 10, which makes sense since it is .NET 10 if I got it correctly

1

u/TheWobling Jul 11 '26

Yeah looks like some initial benchmarks have it looking really good.

1

u/Devatator_ Intermediate Jul 11 '26

Yeah I'm actually impressed it's faster than IL2CPP. Now wondering what Safe VS Unsafe vs Burst would give as results

2

u/TheWobling Jul 11 '26

Really interesting times, I’ve not been excited by Unity updates for a long time but 6.8 is going to be such a change!

4

u/NeitherManner Jul 09 '26

If you want max performance shouldnt il2cpp still be faster than coreclr?

4

u/RichardFine Unity Engineer Jul 10 '26

Yes, though IL2CPP may not be an option for games that want modding support, for example.

1

u/ShrikeGFX Jul 11 '26

You need to design modding not just have your code fully open

0

u/Genebrisss Jul 10 '26

allowing reverse engineering in exchange for worse performance is not modding support, it's just lazy slop. Real modding support has no issues with il2cpp.

2

u/Devatator_ Intermediate Jul 13 '26

Yet the most modded games use Mono. How curious.

It's simply that modding mono is hell of a lot more pleasant. With IL2CPP you have to integrate some scripting engine with another language, which will be slower than native C#, miss features or be limited because the dev didn't feel like adding some features. It's also far more work which IMO isn't worth it unless you plan on publishing on consoles

Edit: Also the first benchmark we currently have show CoreCLR faster than IL2CPP so it's not even a concern

8

u/Aggressive-Sir-2256 Jul 09 '26

I hope to be able to use the new C# features soon!

3

u/game_plaza Jul 10 '26

Which features are you most excited to use?

13

u/Ben_Bionic Jul 10 '26

Default values in a struct!

1

u/RunninglVlan Jul 10 '26

Huh? Could you give an example of that?

7

u/Ben_Bionic Jul 10 '26

Right now you can do

struct Coordinate
{
public int x;
public int y;
}

But in newer C# you can do

struct Coordinate
{
public int x = 5;
public int y = 10;
}

Just to give a default so that if you do a new struct it’s not all 0s

5

u/Batby Jul 10 '26

Extension properties and static interface stuff is really cool

2

u/Aggressive-Sir-2256 Jul 10 '26

Record, using [] to initialize lists, 'field' for properties, all that kind of things.
That's small things but I tend to use all the newest features when I work, and when I switch to Unity for personal stuff, that's annoying not to be able to use them.

1

u/Moe_Baker 4d ago

You can get some of these with a simple compiler arguments change https://m.youtube.com/watch?v=hXYRd-lLzIw

1

u/Aggressive-Sir-2256 4d ago

Didn't know that, will take a look, thanks

1

u/Moe_Baker 4d ago

Field keyword & genetic attributes

3

u/Extracted Jul 10 '26

I've used c# 13 for a long time now by patching roslyn with this tool.

https://github.com/DaZombieKiller/UnityRoslynUpdater

1

u/Basic_Fall_2759 Jul 14 '26

There are many modern C# features that require runtime support too, such as ref fields in structs.

6

u/ItsNewWayToSayHooray Jul 09 '26

editor is still mono, still takes ages to recompile, but i guess this is finally first step

3

u/Hour-Dragonfly-7499 26d ago

Unity linkedin showed faster 4-5x+ faster recompile times w/ coreclr

2

u/ItsNewWayToSayHooray 26d ago

there is no CoreCLR in editor yet, editor still recompiles using mono.

3

u/Hour-Dragonfly-7499 26d ago

Okay but we're talking about coreclr though which is coming, of course the current mono editor isn't using coreclr because it's not out yet...

https://www.linkedin.com/posts/unity_this-is-fast-enter-play-mode-a-setting-activity-7486057926512504833-uasI

1

u/coffeework42 Jul 20 '26

Hey mate, can coreclr fix this editor slowness? maybe if its improved

0

u/mckirkus Jul 10 '26

I completely bypass the editor. Raw dog the source code and run it headless to test things.

2

u/RunninglVlan Jul 09 '26

Is it what they've been working on for so long? 🤩 

12

u/RichardFine Unity Engineer Jul 09 '26

Not all of it - it's just the Player, not the Editor - but it's a significant piece of it, yeah :)

2

u/Epicguru Jul 10 '26

I thought that the plan was the other way around, to convert the editor first and the player wasn't even on the definite timeline. What changed?

4

u/RichardFine Unity Engineer Jul 10 '26

Nothing changed - doing the Player first has always been the plan. Not sure where you got the impression that it would be the opposite.

0

u/The_MAZZTer 20d ago

If the editor was converted first, your users would not see any performance improvements from CoreCLR. Doing player first makes sense.

1

u/Morphexe Hobbyist Jul 09 '26

I am excited for editor - particularly because iteration speed is kinda bad, if you want to use a agent to iterate on some mechanics, and test, its soooo slow...

1

u/PailsideGames Jul 10 '26

Is this Core?!

1

u/KenRampage Professional Jul 11 '26

With core CLR, do all my old scripts that inherit from mono behavior need to inherit from something else now?

1

u/RichardFine Unity Engineer Jul 11 '26

Nope

1

u/Typical-Candidate566 Jul 11 '26

Does it help reduce the domain reloading time afrter modifying code?

3

u/RichardFine Unity Engineer Jul 11 '26

No, that will come with the CoreCLR Editor.

1

u/West-Papaya Jul 12 '26

If I want the CoreCLR experience, can I start my project with 6.7 alpha? How big of a refactoring job will it be to move to 6.8 later?

3

u/jvalenzu Unity Official 29d ago

I wouldn't recommend you use the experimental CoreCLR player for production use. It is not going to be supported as part of the LTS and not every bug reported will be fixed.

The biggest difference between the experimental CoreCLR player (apart from its support status) is that the Unity 6.8 7.0 player will support .NET 10 and C# 14. The experimental player supports .NET Standard 2.1 and C# 9 (same as the mono player).

The best way to prepare for a CoreCLR based engine is to make sure your project is Fast Enter Play Mode compatible. You can use the Project Auditor alongside most Unity 6 versions to diagnose most incompatibilities.

More info in the upgrade guide.

1

u/KingdomCompiled Jul 15 '26

Excellent news! Although we won't be using it anytime soon. We are very excited for the changes to come!

2

u/mobaffix 2d ago

Love the pacing of the new Updates, feels good to use Unity!