Search Issue Tracker

Fixed

Fixed in 6000.3.0a4

Votes

0

Found in

2022.3.52f1

6000.0.26f1

6000.1.0a2

6000.2.0a1

6000.3.0a1

Issue ID

UUM-86895

Regression

No

“AssetDatabase.GetMainAssetTypeAtPath" returns the incorrect type when using a global namespace class with the same name as a Unity type

-

Reproduction steps:
1. Open the attached “BugRepro” project
2. Click on the “Assets/Test Object.asset” asset in the Project window
3. Right-click on it and select "Reproduce Bug"

Expected result: No errors are thrown and the “A.TextSettings from Assembly-CSharp” type is returned
Actual result: Errors are thrown and the “UnityEngine.TextCore.Text.TextSettings in UnityEngine.TextCoreTextEngineModule” type is returned

Reproducible with: 2022.3.52f1, 6000.0.26f1, 6000.1.0a2
Couldn't test with: 2021.3.44f1 (Could not resolve compilation errors)

Reproducible on: Windows 11
Not reproducible on: No other environment tested

Note: Uncommenting the “#define USE_NAMESPACE” line in the "TextSettings.cs" solves the issue

Add comment

Log in to post comment