Search Issue Tracker

Active

Under Consideration for 6000.6.X

Votes

0

Found in

6000.6.0a2

Issue ID

UUM-138545

Regression

Yes

Editor defaults to .NET 4.6 instead of .NET 4.8 when switching scripting API compatibility level to .NET Framework

Scripting Runtime

-

Steps to reproduce:

  1.  Create a new project
  2. Open Edit > Project Settings > Player
  3. Switch API Compatibility Level to .NET Framework
  4.  Create a new script with

“Debug.Log(PlayerSettings.GetApiCompatibilityLevel(NamedBuildTarget.Standalone));“
To get the API compatibility level in the console

Actual results: 
Editor defaults to .NET 4.6 instead of .NET 4.8 as stated in the documentation:
[https://docs.unity3d.com/6000.6/Documentation/Manual/dotnet-profile-support.html]

Expected results: 
Editor defaults to .NET 4.8

Reproducible with versions: 
6000.6.0a2 (64de5ee36373)

Not reproducible with versions: 
2022.3.74f1 ( f81e190e19ca), 6000.0.72f1 (b731fd3ae857), 6000.3.12f1 (fca03ac9b0d5), 6000.4.1f1 (336a400b9ea2), 6000.5.0b2 (4427344da5e9), 6000.6.0a1 (7dc703ab9bd8)

Tested on (OS): 
MacOS M1 Sequoia 15.7.4

Notes:

Example script:

 

using UnityEditor;
using UnityEditor.Build;
using UnityEngine;

[InitializeOnLoad]
public class PrintApiCompLevel
{
static PrintApiCompLevel()

{

Debug.Log(PlayerSettings.GetApiCompatibilityLevel(NamedBuildTarget.Standalone)); }

}

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.