.NET 4.7 and future versions

Hello,

I know .NET 4.6 is still experimental, but I am wondering about the support of .NET 4.7, and also future versions of .NET (how long will it take Unity to catch up - if it will be matter of months or years). I understand that giving estimates is hard, but I guess you have some “if everything goes right” timeline in mind?

I’m asking because of two reasons;

Both of these things could really help with performance of Unity applications, so pardon my impatience. :slight_smile:

1 Like

While we don’t have any specific plans to announce now, we are generally planning to track improvements in the .NET ecosystem like this as closely as possible. I would expect catch-up to be on the order of weeks or months, depending on how releases align in the future.

We are thinking about way to use features like Span and intrinsics in Unity, although our approach might differ slightly. If you have not seen it yet, I would recommend watching this talk to get an idea about the way we are heading:

2 Likes

Hello,

yes, I know about these upcoming features; does the “although our approach might differ slightly” mean you are unlikely to support the approach provided by a future .NET Standard (based on the PRs and discussions it seems it will go through), or will you just support both?

Because especially the access to intrinsics directly from “userland” code would be great. :wink:

As well as if you could port the code in Mathf and vectors/matrices/etc. to use intrinsics in the future (whereever possible), that would be great too - because a new math library sounds cool, but porting old code to it would be probably be a pain in the ass (pardon my french), especially if it would include new Vector/Matrix/Quaternion types. :confused:

I’m not sure about our future support for intrinsics, although we do want to support new versions of .NET Standard. I’ll see if I can find more information about our future plans.

I’ve talked with our Scripting Team, and have a few more details.

Regarding Span, we are not going to use it directly, but we are providing our own buffer types. Span is too limited for our use cases, and having full control over the runtime allows us to define a more powerful data structure. Span will work once we get C# 7.2 support (which is planned) but we won’t base our API on it.

Regarding intrinsics, we are providing our own math library that gets optimized by the Burst compiler. It matches almost 1 to 1 the HLSL math library (this is discussed some in the video) if intrinsics will end up in the standard, they will work, and we might end up adding optimized support for them in Burst too.

1 Like

Ok, thanks for the clarification! :slight_smile:

Looking forward to the catch-up to 7.2, and other improvements in the future. But I guess first even the .NET 4.6 has to become stable, instead of its current experimental state; hoping this will happen sooner than later. :slight_smile: