x


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 '11 at 09:21 AM

ina gravatar image

ina
4.2k 591 644 684

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 '11 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 '11 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 '11 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 '11 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

By RSS:

Answers

Answers and Comments

Topics:

x2360
x1027
x337
x250
x65

asked: Dec 30 '11 at 09:21 AM

Seen: 807 times

Last Updated: Dec 31 '11 at 08:12 AM