Search Issue Tracker

Fixed in 2020.1

Fixed in 2019.3

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

Scripting

-

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.

  1. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in 2020.2.0a11

  2. Response avatar

    Resolution Note (fix version 2019.3):

    Fixed in 2019.3.14f1

Comments (1)

  1. C6e2dea8e5e2aae38bdeaa7b643dd241?d=mm

    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

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.