Find Unity Usages is not working

Answered

Even for the classes that directly inherits MonoBehaviour and have prefab in the project with that component on the root.

My Rider is never showing the Usages popup window in Unity Editor, it just says not found in the IDE.

I have searched nearly half an hour to see if I have disabled something to prevent this but I couldn't even find where is the settings for this. 

Any help is appreciated

Thanks

Unity 2020.3.19f1

JetBrains Rider Editor Version 3.0.15

JetBrains Rider 2022.2.1 Build #RD-222.3739.37

Rider is set as External Script Editor in Preferences > External Tools


1
17 comments

Hello, 

I can see a code vision for usages working, if you click it, can you see usages correctly? Also, Find Usages feature relies on cashes, so please make sure the files containing usages are indexed, there should be no "no index" message next to these files in Solution Explorer.

0

 

I have reinstalled everything yesterday and was able to catch this notification today, just clicked on the `Turn on anyway` button and it started indexing all the assets, I am able to see the Unity usages now. Couldn't find what this button changed in the settings but its works so I'm happy. 

0

Since my update from 2019 to 2022.3 this stopped working for me as well. I do not get the notification from Murat Balci, to re-enable indexing and could not find a setting where I can enable it manually.

0

Ayhan Sakarya, is RiderEditor package up to date in the Unity package manager? Do other Unity functions work as expected in Rider?

0

Olga Diakonova, yes I updated the Rider package to the latest version. I can start/stop the play mode through Rider and also attach rider to the editor for debugging. Adding Unity scripts etc. through Rider also works. The only thing which does not work seems to be the "Find Unity Usages".

The project is extremely big, so in the last version I sometimes received the same notification as Murat Balci above and were able to click "Turn on anyway". But in this version I never received such a notification unfortunately.

0

I now used the File -> Invalidate Caches with "Clear VCS Log caches and indexes" checked and restarted Rider. Atm it looks like no usages are found, so it probably is re-indexing now. Will let you if it worked once it finished.

0

Ok the solution-wide analysis has finished, but unfortunately the "Find Unity Usages" feature still doesn't work.

0

Do you see other code vision options? Can you check if you have selected everything required and position of it in Preferences | Editor | Code Vision?

0

Yes, everything is selected

 

Edit: And yes, I can see other code vision options like usages, version control author etc. Only the unity usages are missing and also do not work when doing rightclick -> Find Unity Usages

0

I noticed now, that I am also unable to uninstall the Jetbrains installation after upgrading from 2020.2.5 to 2022.3.

 

It seems to start 2022.3 but all folders and icons still have the name 2020.2.5. Maybe this is related to the issue above.

 

EDIT: I finally was able uninstall it by installing 2022.3 in a different folder and copy its uninstall.exe into the old 2020.1 folder. Starting Rider now through Unity results in the following:

The JetBrains Rider Package is already up to date (v3.0.17 - Dec. 05) and Rider is also set to be the default external editor under Unity Editor -> preferences.

 

EDIT 2: After a restart the warning above does not show up anymore, but the "Find Unity Usages" feature still doesn't work.

0

I was now able to get the notification to enable indexing by checking this box hidden in the unity settings:

 

However, now it does not let me turn it on. Each time I click "Turn on anyway" it simply turns it off again:

 

EDIT: I increased the max heap size Rider is using via Help -> Change Memory Settings and restarted Rider once again. At the moment it seems to process the assets and does some caching, which looks promising. Will write again once it has finished.

1

Finally, it started to work again. I hope the description of my journey above helps others with the same issue.

1

"Help" -> "Change Memory Settings" did the trick for me. Thanks a lot for sharing your solution! Ayhan Sakarya

In my case, I adjusted the "Maximum Heap Size" from 1500 to 2000 MiB, then clicked "Save and Restart".
I needed to open "File" -> "Settings" and enable the option "Parse text-based asset files for script and event handler usages" in the "Unity Engine" section. Once I clicked "Save", Rider started indexing all files.

0
Hello,

Thanks for sharing the solution here, I hope it will be helpful to others!

I have tried to reproduce this behavior with various projects and did not succeed so far. It would be very helpful for us to be able to reproduce this on demand or at least understand what exactly causes it. Would it be possible for anyone affected to share a sample solution with which you have experienced this issue? The solution can be shared privately through a support ticket, we can sign an NDA if need be.

Thank you in advance.
0

Hey Ivan, sorry for my late response (I was on parental leave).

Unfortunately I don't think that I can give you a sample solution of our project because of various legal reasons. But I can say, that our project is very big (I know, very vague statement). If you are still interested to learn more, please write a message to me via email, since I don't know what I am allowed to share publicly at the moment.

0

It never works for me. I don't even understand what it's supposed to do. Every time I press “Find Unity Usages” absolute nothing happens.

0

Hello,

Please use the Find Usages action. Find Unity Usages action is deprecated and will be dropped in the next release.

0

Please sign in to leave a comment.