Objects and Scripts references


I understood this course before lectures “Laser Defender”.
But now my mind has stopped.
Too many references in Code and Unity object.
Give me advice plesase. Which programm can I use in order see all References in my Unity game?

Hi Sergey,

When you say “too many references” and “in order to see all references in my Unity game” - what exactly do you mean?

Hi Rob,

Now this game has many references(relationships) between objects and beetween methods in code. I want to see all of this in one diagram…

I see.

You won’t get that in either Unity or Visual Studio.

Visual Studio will enable you to create a class diagram based on inheritance etc, so you could create something in there, but it won’t show you which GameObjects have script components attached. Unity doesn’t provide anything like this either.

You can, within Unity, select a script, right-click and choose Show All References In Scene, that will highlight objects which reference that script, but they may not be objects that have the script as a component themselves, for example, you may see a child GameObject listed, because its parent has the script attached.

You might find something in the Asset Store which can help, for example, there are tools like this;

If you are finding this section more challenging, it might be worth starting at the beginning of the section and just got through each lecture again, re-tracing your steps etc, and make sure you are happy with what was covered and you have done at the end of each lecture. If not, take a short break, then go through it again. New concepts will be introduced all the way through the course, so getting a good grounding at the beginning will help you as you progress. :slight_smile:

1 Like

Privacy & Terms