Search Issue Tracker

Active

Under Consideration for 2022.3.X, 6000.0.X, 6000.1.X

Votes

0

Found in

2022.3.52f1

6000.0.26f1

6000.1.0a2

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

All about bugs

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