x


UI vs Scripts question - what's where?

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

more ▼

asked Aug 12 '10 at 09:44 PM

Tracy Valleau gravatar image

Tracy Valleau
41 3 3 5

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.

Aug 12 '10 at 10:11 PM Wolfram
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

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.

more ▼

answered Aug 12 '10 at 11:11 PM

felix. gravatar image

felix.
1.9k 18 23 46

(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Aug 13 '10 at 01:03 AM

Julian Glenn gravatar image

Julian Glenn
2.6k 5 12 47

(comments are locked)
10|3000 characters needed characters left

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.)

more ▼

answered Aug 31 '11 at 12:30 AM

MattMaker gravatar image

MattMaker
71 1 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3678
x3325
x1668

asked: Aug 12 '10 at 09:44 PM

Seen: 779 times

Last Updated: Aug 31 '11 at 12:30 AM