Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Find function name occurrences in all scripts, HOTKEY

Discussion in 'Scripting' started by jeremy_crowell, Oct 2, 2018.

  1. jeremy_crowell

    jeremy_crowell

    Joined:
    Jul 21, 2018
    Posts:
    83
    I have a function which used to accept integer as parameter, now I changed the type of this parameter to string. Thus now I need to update this function everywhere it was used in scripts.

    Is there any way to find where this function was used? CTRL+F will work for one file but I have lots of files to check. I think there should be some command from interface, search by name in all files...

    Thank you in advance.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,955
    in visual studio, can do "Find All References"

    upload_2018-10-2_17-18-45.png

    or can do search whole project from the ctrl+f window,
    upload_2018-10-2_17-19-55.png
     
    jeremy_crowell and FernandoHC like this.
  3. jeremy_crowell

    jeremy_crowell

    Joined:
    Jul 21, 2018
    Posts:
    83
    That's exactly what I was looking for. How can I get access to this window?
     
  4. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    You can find the option in the context menu that opens when you right-click on an identifier.
    In version such as VS Enterprise, there's also an additional greyish info above method names, that allows you to see a quick overview by clicking it.

    The shortcut for 'Find All References' may differ from the screenshot, you can either try the shortcut that's shown in the screenshot or Shift + F12 (that was the default when I installed it). However, it could as well be completely different in your version.
     
    jeremy_crowell likes this.
  5. jeremy_crowell

    jeremy_crowell

    Joined:
    Jul 21, 2018
    Posts:
    83
    Shift+F12 worked perfectly, thank you.
     
    Suddoha likes this.