Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by donimation · Mar 09, 2017 at 03:52 PM · editorconnectionviewsearchfeatures

Can the Unity Editor 'Find References' for a particular Game Object; like MonoDevelop can for highlighed variables?

Hello,

Being able to "Find References" in MonoDevelop is incredibly useful. Is there a way to do the same in the Unity editor? For example, can I select a GameObject in the Hierarchy view and then somehow see all its (possible) connections to other.. scripts or what-have-you?

[edit] "connections to other.. scripts;" those DO show up in the inspector, my bad. What I'm Really looking for is possible REFERENCES of selected GOs in other scripts; that's what I mean by "connections." Pardon my unfamiliarity with the proper terminology.

[edit2] By "REFERENCES" I mean like when you drag and drop a GO onto a script's public variable in the inspector. There are cases where I've dragged and dropped a GO onto several scripts and it would be extremely helpful to be able to find/see all its references/connections in the unity Editor. (Perhaps such a feature already exists and I just don't know how to find/look for it ;/ )

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
6

Answer by viesc123 · Jul 16, 2020 at 05:30 PM

You can select a GameObject in a scene and right-click any of it's components in the Inspector and select "Find References In Scene". It will look for all references to that component and in turn (since the GameObject references it) also to all references of the GameObject. Works similar to the Find Reference command for assets, in that it will show chain-references (A is referenced by B, B is referenced by C...) Dunno if this functionality is new or if has been here all along. alt text


find-references.png (94.1 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
5

Answer by Gotlight · Mar 30, 2017 at 08:22 PM

Hi @donimation! If I got it right, you look for a usage/reference finder asset.

You mentioned our tool, Asset Usage Finder, but probably aren't sure if it will be worth the money. Based on experience of users that bought it, the tool saves you much more than it costs (take a look at reviews on Asset Store). Btw, it's being used not only for finding references, but for cleaning the project, too.

https://www.assetstore.unity3d.com/en/#!/content/59997

If Asset Usage Finder looks good to you, buy it. In case it won't be useful for you, we'll refund you the full price!

alt text

Denis


90270-x.jpg (87.1 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by erik7302 · Mar 12, 2017 at 06:10 PM

use get component to your proyect

example:

 using UnityEngine;
 
 public class Script1 : MonoBehaviour
 {
     public int Test = 1;
     public GameObject;
 }

other script

 using UnityEngine;
 
 public class Script2 : MonoBehaviour

    //This script is used to change a value or get an object from another script
     void Start()
     {
         Script1 S = GetComponent<Script1>();
         S.Test = 2;
         Cube = S.GameObject;
     }

If this does not help, be more specific than what you want to do

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by jjcrawley · Mar 10, 2017 at 02:14 AM

If I've read the question right, you would like to know whether there is a way to see all the objects that use an object.

You're after EditorUtility.CollectDependencies, this should find the dependencies of the objects that you provide it.

Here's a link to the documentation on it: https://docs.unity3d.com/ScriptReference/EditorUtility.CollectDependencies.html

Bare in mind, this is only available in the editor, and you have to write your own custom script to use the method.

Hopefully this is what you're after.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image donimation · Mar 10, 2017 at 03:06 AM 0
Share

Thanks for the reply jj! I looked at the documentation you provided and I'm trying to figure out how to open that [EditorUtilityColl] tab on the (I'm guessing) inspector (?) so I can "Find/Check Dependencies"

By "write your own custom script to use the method." you probably mean.. I need to create a script (code provided in documentation I guess ?) to get it to show up on the editor?

I was hoping for some window I could find in like Edit>Project settings or something.

I found a similar question here: http://answers.unity3d.com/questions/179224/is-there-a-way-find-usage-of-an-asset.html

and I guess there are assets that do something like that (and then $ome) https://www.assetstore.unity3d.com/en/#!/content/59997

but I was hoping for something slightly more.. accessible.

avatar image
0

Answer by Ogdy · Apr 23, 2020 at 12:08 PM

Hi,

Check out this open source tool ! It is perfect for finding dependencies of an asset and what references it.

https://github.com/ogxd/project-curator

alt text

Have fun !


2020-04-23-14-03-23-ogxd-project-curator-a-conveni.png (93.0 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LHAppri · Mar 03 at 08:11 PM 0
Share

Note: This works nicely for finding where specific Assets like materials are referenced, it doesn't find references to particular GameObjects linked in the Inspector as the OP talks about

  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

84 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to rotate Editor view in Unity 4.5.1? 2 Answers

Was the feature of using the Asterisk ('*') as a wildcard Removed? 1 Answer

Raycast from mouse position in editor scene view? 1 Answer

Ho do I find all scenes with a certain script on an GameObject 2 Answers

Game View too small to fit iPad preview (on 13" Macbook) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges