Search Issue Tracker
Duplicate
Votes
3
Found in
5.4.0b11
Issue ID
782915
Regression
No
AssetDatabase is not updated after renaming script which is referenced in an asset
Steps to reproduce:
1. Download and open project
2. Execute Mainmenu/BugReport/Log FruidConfig count (typo) - Notice it prints "4 FruidConfig's found" to the Console window, which is correct
3. Rename Scripts/FruidConfig.cs to Scripts/FruitConfig.cs
4. Open Scripts/FruitConfig.cs, rename the class from FruidConfig to FruitConfig and save
5. Execute Mainmenu/BugReport/Log FruitConfig count - Notice it prints "0 FruitConfig's found" to the Console window, which is wrong.
Workaround:
Reimport assets containing folder "Fruits".
Notes:
Using AssetDatabase.FindAssets("t:<class>") for outputting all the assets count value referencing to that class, outputs wrong count value of all the assets referencing to that class.
Reproduced with: 5.2.4f1, 5.3.4p1, 5.4.0b13
-
Resolution Note (2020.2.X):
Fixed in unity version 2020.2.0b3 with asset database V2
-
Peter77
Aug 24, 2019 16:47
Related forum thread:
https://forum.unity.com/threads/assetdatabase-findassets-not-working.587062/
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
This is a duplicate of issue #1068482