Before updating to Windows 10 you may need to return your Pro license. More information here

Browse where all scripts are relative to gameobject reference

Is it possible to browse where all the scripts are in a project relative to the gameobject that contains them - i.e., which game object has which scripts etc?

Is it also possible to find out which gameobjects reference which scripts that are not actually placed in the gameobject?

more ▼

asked Dec 30, 2011 at 09:21 AM

avatar image

5.2k 1646 1293 1346

For the second paragraph: Do you mean like figuring out if a script access another script via GetComponent or something? Or just a public reference?

Dec 30, 2011 at 09:41 AM Statement

Yes, both GetComponent or referenced as a global - or just called as a static - basically all the cases a gameobject can reference/call another script

Dec 30, 2011 at 09:52 AM ina

It's impossible to tell for sure since GetComponent accept a string argument which can be generated/selected at run-time. But that is a very special scenario. Because Unity allow for reflection, it's quite hard to decide by automated means which files are in use and which ain't, since the files could be deferred to at a later point in time. But if you have all types as references, you could make write an editor script that would parse all public members and try to match them with source files. I haven't been toying around too much with the different ways of determining dependencies between scripts in the editor, so maybe there are tools that can help you already.

Dec 30, 2011 at 10:09 AM Statement

Hmm what about just a way to browse which game objects contains which scripts then? (Ignoring the second part for the in-line GetComp references)

Dec 31, 2011 at 08:12 AM ina
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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



Answers and Comments



asked: Dec 30, 2011 at 09:21 AM

Seen: 1054 times

Last Updated: Dec 31, 2011 at 08:12 AM