|
As my collection of scripts grows in my (first) Unity (iPhone) project, I'm forced to wonder: 1) is there any way in the UI to see what objects the scripts are attached to? I know it goes the other way, but I want something like: highlight script and see what objects use it. (Yes, I know I can do a print(name), but that's not what I'm after. I really almost expected to be able to control-click a script and see this information.) 2) is there a way to find a function (OK: any text) across all scripts? (ie: which script holds function doThis(); ? With my luck, I may have missed where all this is covered. If so, please point me at the proper docs. Thankfully, noob-ness doesn't last forever. :-) TIA
(comments are locked)
|
|
As to 1) - part (if not all) of this comes with Unity3: http://blogs.unity3d.com/2010/06/15/unity-3-feature-preview-asset-management/ As to 2) - As Wolfram mentioned, I would use an external tool to search in multiple files. For Windows, I can recommend Notepad++. Since Unity2.6 it can be connected with Microsoft Visual Studio, too.
(comments are locked)
|
|
No. 2.) Not sure about Mac but on a Windows box the UniSciTE editor has a Find in Files function built in. Choose : Search >> Find In Files. or Ctrl + Shift + F
(comments are locked)
|
|
I have been wanting this (a "reverse dependency" finder; a "What uses this asset?" function) also, and I haven't found any other solution that does exactly what I want, so I wrote this editor script to do it: http://unifycommunity.com/wiki/index.php?title=UnityAssetXrefs drop it in your "Editor" folder; it should add a "What objects use this?" command to your Assets menu. (I have an update coming soon that will add a progress bar to it.)
(comments are locked)
|

a big +1 for your 1) - I miss that functionality all the time. Not only for Scripts, but also for Materials, and other assets. I seem to remember there is some sophisticated Editor plugin, and your request is just one of its minor features. Unfortunately I don't remember which plugin that is. #2 might be more complicated. I generally help myself by installing cygwin, and doing a find-grep over all scripts :o) grep is an incredibly useful UNIX/Linux tool - if you are using OSX you are lucky, as it should already be available to you when you open a terminal/shell.