Search Unity

Global Find / Search and Replace in Unity

Discussion in 'Scripting' started by auzette, Mar 24, 2009.

  1. auzette

    auzette

    Joined:
    Mar 23, 2009
    Posts:
    74
    Is there a way in Unity editor to be able to do a search through any/all scripts in the project (global find? or global search/replace?)
     
  2. Alex

    Alex

    Joined:
    Nov 19, 2008
    Posts:
    122
    Unitron can do a find and replace in all documents you have open in it. It's under Find-->Advanced Find. Not sure about the editor that Windows uses, I haven't played with it enough.

    If you mean inside of Unity and not the code editor, then I don't think you can.
     
  3. auzette

    auzette

    Joined:
    Mar 23, 2009
    Posts:
    74
    Nod. Thanks for the reply. Yeah, I figured if there wasn't a built-in way to do it, then I'd use an external tool (yes, I'm in Windows land, I should have mentioned that).

    Thanks.
     
  4. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Why should unity have a built in tool to handle something which is clearly in the domain of your text editor? The unity editor doesn't facilitate script writing - it just allows you to hook up your scripts to GameObjects.

    Sorry spun off the "no built-in way" thing :p
     
  5. auzette

    auzette

    Joined:
    Mar 23, 2009
    Posts:
    74
    Why should unity have a built in tool to handle something which is clearly in the domain of your text editor? The unity editor doesn't facilitate script writing - it just allows you to hook up your scripts to GameObjects.

    Well, my thinking is that Unity stores all assets (which include scripts) as part of its project definition / manifest, which is very much within its domain.

    It's very handy that Unity provides the linking mechanism to allow external tools to modify assets (photoshop for images, 3d tools for models, text editor for scripts). I agree that it wouldn't be an expectation that the Unity editor needs to have bitmap editing, model editing, script editing, etc.

    The only tool that knows all of the assets of a given Unity project (including scripts) is Unity itself. To that end, a project level search facility seems a reasonable feature to ask about.

    In any event, a general external file search tool will work.

    Thanks.
     
  6. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,971
    You could use a windows "File content" search.

     
    gothicserpent likes this.
  7. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    193
    Man thanks I was looking for exactly this!
     
  8. Apoll0

    Apoll0

    Joined:
    Jun 11, 2015
    Posts:
    16
    You can also use MonoDevelop's "Find in Files" feature.
    findinFiles.png
     
  9. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    193
    Lol, funny that you replied on a 3 year old comment. If I recall correctly that function did not exist at that time.
    But thanks anyway haha!
     
  10. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    Worked perfectly, thanks!