Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 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
15
Question by KevinW · Feb 23, 2014 at 10:50 PM · inspectorfindreferencesreference-other-objectusage

How can I Find All References to an object in the inspector?

I have inherited a huge project in Unity 3.5, which makes heavy use of dragging/picking object references from an object in the hierarchy to some other object in the hierarchy. There is no documentation covering what all objects in the scene are referencing some other given object in the scene, and as I mentioned, the project is quite large - main scene containing about 16k objects.

I need a way to search from the target object to find all other objects in the scene that are referencing it. Obviously, going the other way, the editor will ping the object you're tying a reference to. However, I'm looking at objects in the hierarchy that need to be investigated, but I can't easily locate all the things controlling it or interacting with it.

Any technique akin to doing a "Find All References" on an object in C# would be greatly appreciated.

Comment
Add comment · Show 7
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 CodeElemental · Feb 23, 2014 at 11:06 PM 0
Share

I havent used anything like that, but you could try tagging the objeccts and search them by tag in the scene hierarchy.

avatar image ___Petr___ · Jan 14, 2015 at 12:19 PM 0
Share

Did you find good solution? I need this too.

avatar image risingsunshine · Nov 25, 2015 at 02:55 AM 1
Share

In my project, I use plugin 'Find Pro' to find out all references to an asset.

It's easy to use and it supports searching both in the project folder and in the scenes.

Details: https://www.assetstore.unity3d.com/#!/content/45693

avatar image sarahnorthway risingsunshine · Dec 17, 2015 at 01:41 AM 0
Share

Find Pro did the trick for me. Select Results in Hierarchy View, click the object you want to find in the Hierarchy and press Select, Root, then Search. Definitely worth $25 - thanks.

avatar image rlo sarahnorthway · Dec 17, 2015 at 08:06 AM 0
Share

This is a off topic but are you the same sarah who developed Rebuild?

Show more comments
avatar image KOpixel risingsunshine · Oct 25, 2016 at 10:12 PM 1
Share

Unfortunately, it seems like Find Pro solution doesn't exist anymore, but this one did the trick for me (asset usage finder) , very simple interface, powerful and costs only 7$

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

8 Replies

· Add your reply
  • Sort: 
avatar image
11

Answer by Gotlight · Sep 16, 2016 at 10:11 PM

However, I'm looking at objects in the hierarchy that need to be investigated, but I can't easily locate all the things controlling it or interacting with it.


Hi @KevinW ! I know it might be a bit late, but there's an elegant solution (an asset) for this.

Its main idea is opposite to Unity's Select Dependencies feature, yet asset is offering much more (see screenshot below).


Key features:

1) It shows you particular fields where the asset is used
2) It allows you to easily replace it
3) Search for further usages of assets in the results list


Asset Store link:

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


alt text
NOTE: I'm one of the authors of Asset Usage Finder and I will be happy to answer your possible questions on our product


UPDATE: v3.0 was released! More than 20x faster compared to 2.0 version


90270-x.jpg (87.1 kB)
Comment
Add comment · Show 4 · 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 kamran-bigdely · Apr 27, 2017 at 09:30 PM 0
Share

The opening post is asking how to find all references to a gameObject. You answer is irrelevant because you talk about how to find all references to an asset.

avatar image Gotlight kamran-bigdely · Apr 28, 2017 at 03:04 PM 1
Share

Hi kamran, $$anonymous$$evinW was asking about objects, most likely meaning UnityEngine.Object which gameObject inherits from.

Asset in our case means any item that can be used in game or project as defined here: https://docs.unity3d.com/$$anonymous$$anual/AssetWorkflow.html

Asset Usage Finder in the result finds all references of UnityEngine.Object in both project and scenes, so my answer is pretty relevant.

Thanks

avatar image kamran-bigdely · Apr 29, 2017 at 12:03 PM 1
Share

@Gotlight Yes. You are correct and thank you for clarification. I bought the asset and it can find all references to a gameObject in the scene. By the way, I noticed that you are the author of this asset but it's not obvious in your answer. It would be nice to disclose this fact in your answer.

avatar image Gotlight kamran-bigdely · May 01, 2017 at 05:33 PM 1
Share

@kamran-bigdely I'm glad you've chosen our product. Thanks for noticing that detail, I have added a note to my original answer

avatar image
2

Answer by TonyLi · Feb 24, 2014 at 05:33 AM

There's an ugly way, but it'll give you every reference, and you can script it to make it a littler easier.

Change Asset Serialization to Force Text (Edit > Project Settings > Editor). You need Unity 4+ or Unity 3.x Pro to do this.

The scene file (.unity) will contain blocks of text like this:

 --- !u!1 &1116311739
 GameObject:
   m_Component:
   - 4: {fileID: 1116311741}
   - 114: {fileID: 1116311740}
   m_Name: Object1
 --- !u!114 &1116311740
 MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 522cee70d3f794241885ec229977790f, type: 3}
   anotherObject: {fileID: 107191716}
 --- !u!4 &1116311741

For clarity, I cut several lines. This is a GameObject named "Object1". It has a fileID of "1116311739". It also has a script with a fileID of "1116311740". That script has a field that references another object with file ID "107191716".

So hopefully this gives you an idea of how you can parse through the .unity file to get a list of all references.

If you only want to go through the GUI, then you can make sure everything is built from prefabs or basic types (textures, etc.). Then right-click on each prefab and select "Find References in Scene" similarly to how it's described here: http://blogs.unity3d.com/2011/03/24/ninjacamp-iii-what-references-your-assets/

Or, for something in between, you can use EditorUtility.CollectReferences() but it'll still take some scripting work. This answer gives an idea of how to go about it.

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
2

Answer by Daniel-F · Apr 23, 2016 at 04:00 AM

Relevant script here in case it's of use to anyone who, like me, found this page via Google.

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 zombience · Jul 26, 2017 at 05:26 PM 0
Share

thanks for the reference. exactly what i need, since i do not want a pre-packaged tool, but have a very specific use-case. thanks!

avatar image
1

Answer by whydoidoit · Feb 24, 2014 at 05:47 AM

Ok so I've got something that might help with that graphically (attached). It lets you examine the scene objects that selects anything which has a dependency on them (using the "@" button). You need to open the window using

 Window > whydoidoit > Recent Selections

Then switch to the Scene Assets tab and open the section for the kind of thing you are looking for etc.

The package is here (should hopefully contain everything): link text

alt text


helpers.unitypackage.zip (47.3 kB)
screenshot 2014-02-24 13.44.48.png (49.7 kB)
Comment
Add comment · Show 2 · 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 whydoidoit · Feb 24, 2014 at 05:48 AM 0
Share

Sorry you'll have to cope with the ugly italic embeds around a few things, not updated it since the GUI slightly changed in Unity.

avatar image whydoidoit · Feb 24, 2014 at 05:51 AM 0
Share

And the other tabs on here have a different function (it lists the items you recently selected so you can go back to them quickly when navigating the project - I just put scene assets on here as a place to call home, it's not really related to the other bits though!)

avatar image
1

Answer by mobstgram · Oct 08, 2016 at 02:49 PM

How about using this asset ? https://www.assetstore.unity3d.com/en/#!/content/69028

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 Darkgaze · May 28, 2020 at 02:08 PM 0
Share

https://assetstore.unity.com/packages/tools/utilities/reference-finder-69028

  • 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

36 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

Related Questions

Inspector Assigning VS Script Find and Get ?? (efficiency) 2 Answers

Assigning references quicker through script 1 Answer

How To find all UnityEvent references for a method? 1 Answer

Is it possible to pick reference variables from one component, in another (different) component via the inspector? 2 Answers

Inspector references and scripts with the same name 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