Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2019.3.X
Votes
1
Found in
2018.1.0f2
Issue ID
1068482
Regression
No
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.
-
WidmerNoel
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.
-
The_MrX_
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.
-
Pelican_7
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.
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
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
- Memory Leak warnings are thrown when opening an imported Prefab
- Crash on mono_push_other_roots when setting Normal Thread Affinity
- Editor exits Play mode when another project is being created using Unity Hub 3.8.0-beta.1
Resolution Note (fix version 2020.1):
Fixed in 2020.2.0a11
Resolution Note (fix version 2019.3):
Fixed in 2019.3.14f1