Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2019.3.X
Cannot find ScriptableObject asset by search in Project Window when namespace of corresponding script is changed
How to reproduce:
1. Download and open attached "Asset Namespace Change Bug" project
2. In the Project Window's search bar type "t:MyScript"
3. "New My Script.asset" shows up
4. Open "MyScript.cs" script and change the namespace to anything else (it is important to use VS potential fixes option after changing the namespace)
5. In the Project Window's search bar type "t:MyScript" again
Expected result: The "New My Script" asset shows up in Project Window
Actual result: The "New My Script" asset does not show up in Project Window
Reproduced with: 2017.1.5f1, 2017.2.3p3, 2017.4.9f1, 2018.1.9f1, 2018.2.3f1, 2018.3.0a8
Notes: - The asset still seems to work fine for all other purposes though. The "New New Behaviour Script.asset" still keeps its reference to the "New My Script.asset".
- Changing the namespace back or manually reimporting the asset fixes the issue.
May 17, 2022 20:35
Just updated to LTS 2021 a few weeks ago and this issue is back for me as well. This issue should be reopened. A "Reimport All" fixed my issue as well.
Feb 24, 2022 22:33
Just had this bug today in 2020.3.22f. So seems to be back or something. Couldn't find asset with
AssetDatabase.FindAssets("t:" + className);
until I re-imported the scriptableObject.
Jul 11, 2019 10:37
A couple of additional points:
1. MonoScript's GetClass method returns null in the first domain reload after the namespace is changed (2019.1.0f2).
2. A current workaround can be to use Resources.FindObjectsOfTypeAll, which will find the assets that AssetDatabase.FindAssets cannot find.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- IL2CPP Player crashes when there aren't enough Thread Static Slots
- Articulation Body tree changes behavior after attaching a trigger Collider
- Fatal freeze when playing a VFX made with VFX Graph and consisting many effects
- "Failed to download Build.data.br file" error is thrown when building projects for WebGL with the Compression Format set to "Brotli"
- Documentation Link does not work when the "New Panel Settings" question mark is clicked
Resolution Note (fix version 2020.1):
Fixed in 2020.2.0a11
Resolution Note (fix version 2019.3):
Fixed in 2019.3.14f1