Newer C# versions setup?

I am using Unity 2022.3.6f1 for VRChat world development. I wanted to try to use some newer C# features. The setup currently uses C# 7.3 (apparently) and I’m trying to use a feature available from 8.0.

I’m finding all sorts of videos, websites and such that illustrate how to use these features, several threads about related things but nothing I do seems to affect the version of C# being used.

It could be related the VRChat tooling but when I try to set the Api Compatibility level in the Player settings to .NET Standard 2.1 it resets back to .NET Framework I don’t even know that that is a requirement but many postings seem to indicate that it is.

Any pointers would be appreciated.

  1. You cannot upgrade the C# version in Unity
  2. For VRChat support join the VRChat discord. They are really active

This is a long running official thread that still sees a lot of activity. Josh Peterson of Unity remains active in the thread, updating people about plans for future versions of Unity using Core CLR so that they can more directly support newer C# features as they are released. But, there may be newer things that you just cannot use yet until Unity supports them.

“EDIT (October 27, 2023): We’re focused internally on developing and shipping new .NET support, with our current target being .NET 8. We don’t have a shipment date to share publicly yet, but I’ll respond on this forum thread with details when I do.”

1 Like

Thanks I am active on there as well and answer a lot of questions :slight_smile:

1 Like

I just don’t understand what I’m seeing then.

These seem to indicate that later versions of C# can run. They specifically mention versions prior to Unity 2022 don’t they?

This one is from VRChat Current Unity Version | VRChat Creation and again specifically mentions the Unity version I am using and C# 8.0 support.

Other websites suggest changing settings on the Player settings tab.

How can there be articles and videos showing it working?

You can run them but there are missing features. What feature were you trying to use from C# 8?

The GitHub repository and the documentation mention that they migrated to .NET Standard 2.1.

https://github.com/vrchat/packages/releases
https://creators.vrchat.com/releases/release-3-5-0

The docs tell you what C# version a particular version of Unity supports: Unity - Manual: C# compiler

It’s been C# version 9.0 since Unity 2021.

1 Like

Just call me confused then. I thought I read the docs, watched the videos, etc.

I’ll try again another day.