Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X

Votes

0

Found in

2017.1.0b9

Issue ID

1351973

Regression

No

AssetDatabase.GetMainAssetTypeAtPath() sometimes loads objects when deriving their type, and leaves them loaded

Asset - Database

-

Reproduction steps:
1. Open the project in the attached GetMainAssetTypeAtPath_Bug.zip
2. Run the test script using the menu item 'Test/Test'

Expected result: There is no red assertion failure, and the test finishes with 'Unloading asset...'

Actual result: A red assertion message will fire

"AssertionException: The asset should not be loaded after calling GetMainAssetTypeAtPath()!
Expected: False
But was: True"

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.