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
4
Question by Memige · Nov 08, 2012 at 10:50 PM · editorassetdependencies

Searching for the Dependents of an Asset

Hey everyone,

I am curious if there is a quick way to check an entire project for anyplace that uses a particular asset. To clarify I'm not looking for what an asset needs, but rather what objects need the asset. My project has a lot of scenes and going through each using the "Find references in scene" is a bit cumbersome. Is there a faster alternative that anyone is aware of?

Thanks, Memige

Comment
Add comment · Show 1
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 Memige · Nov 09, 2012 at 12:56 AM 0
Share

It occurs to me I could delete the asset and see what all breaks, but that seems like a rather inelegant solution.

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Memige · Jan 04, 2014 at 12:02 AM

I ended up doing as I mentioned in my comment. Temporarily deleting the asset and running the game to see what breaks. As mentioned, not the most elegant of solutions, but at the moment it seems to be the only way to find the objects that use a given asset.

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 Gotlight · Jun 13, 2017 at 07:22 AM 1
Share

Please check my answer below, it should solve your problem.

avatar image
5

Answer by Gotlight · Apr 02, 2017 at 10:24 PM

To clarify I'm not looking for what an asset needs, but rather what objects need the asset. My project has a lot of scenes and going through each using the "Find references in scene" is a bit cumbersome. Is there a faster alternative that anyone is aware of?

It occurs to me I could delete the asset and see what all breaks, but that seems like a rather inelegant solution.

Hi @Memige! It may be a bit late, but actually there is elegant solution of this problem. A tool with opposite core idea to Unity's Select Dependencies - finding assets that use particular asset.

After several major updates, an asset offers great interface for working with results and is much faster. Nested Prefab support recently added. It offers search in Project, but you can search in Scene as well.

For example, it offers:

✔ Usage search for ALL types of assets, e.g.: Scripts, Shaders, Scenes, Materials, Sprites, Prefabs, Fonts, Textures, Sounds...
✔ Search for usages in: Prefabs, Scenes, Atlases, Materials and others
✔ Exact fields that use selected asset

There is also a rapid support for the product (8-hr response/resolution time 24/7)

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

alt text

Denis

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 rhys_vdw · Dec 19, 2021 at 10:30 AM 0
Share

Hi can you please share the name or new URL of this asset? Unity have broken all asset store links and you haven't given enough information to find it.

avatar image
0

Answer by Proportion1 · Nov 09, 2012 at 12:40 AM

sounds like you should be using tags.

http://docs.unity3d.com/Documentation/Components/Tags.html

just put the same tag on that perticular asset, and it will be heaps faster.

u can use Gameobject.FindWithTag("particular asset") and it will just find the one thing that has that tag.

but if u want to find all of them, for example a bunch of street lights that you wanted to turn on, u would use:

Gameobject[] streetlight = Gameobject.FindGameobjectsWithTag("street light");

this will put all the gameobjects in an array for you. then you use a foreach loop:

foreach(GameObject streetlight){ //turn on }

im not currently at a computer with unity on it but i hope this is what you were looking for.

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 Memige · Nov 09, 2012 at 12:50 AM 0
Share

Unfortunately that will only work for finding gameobjects at runtime that I flag ahead of time, meaning I would already have to be aware of them. I need a method that will (for example) let me find all gameobjects in the project that are using a given texture.

avatar image Proportion1 · Nov 09, 2012 at 01:22 AM 0
Share

wouldnt you have set the texture of the object ahead of time as well? also, you can add tags to children of prefabs. so like you can make a prefab of something, put a tag on it, then add that prefab to other assets in your project and find them via tag. im guessing i dont understand the question heh.

avatar image Memige · Nov 09, 2012 at 01:30 AM 0
Share

I'm working on a large project with several people adding/changing things. One of my $$anonymous$$mmates has used some textures for a handful of objects and those textures are changing in a way that requires me to make some adjustments to the gameobjects there are attached to. I know the name of the textures, but I don't know what objects they are attached to. Thus, I need a way to search for gameobjects throughout the project that are using a specified texture.

avatar image Proportion1 · Nov 09, 2012 at 03:18 AM 0
Share

oh i understand. i will write you an answer when i get home from work (im a photographer not a programmer heh). but on awake i'd use http://docs.unity3d.com/Documentation/ScriptReference/Object.FindObjectsOfType.html?from=GameObject to make an array of all the gameobjects, then use a foreach gameobject loop to find which gameobjects have the texture, then put each of those gameobjects in their own array. that way when you need to change the game object with that texture, they will all be in the same array. but if the textures are changing at runtime, putting something like that in update would be mega slow, unless you know the handful of objects that could possibly have that texture, then you could tag those potential objects that way you dont have to search through every object.

i will write a scrip when i get on unity (about 2 hours).

avatar image
0

Answer by vtunity · Jun 21, 2017 at 07:05 AM

This will work For you. Once you Build a Project for Any platform unity will serialize all Reference and Generate Editor Log for a scene you place in build setting.

Then After Use this asset : https://www.assetstore.unity3d.com/en/#!/content/22983

It will Remove all Asset which is not necessary .

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

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

13 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

Related Questions

Custom Asset Icons? 2 Answers

[Solved]Why doesn't my ScriptableObject based asset save using a custom inspector ? 1 Answer

Why Are My Project Assets Constantly Re-Importing? 2 Answers

How to highlight or select an asset in project window from editor script? 2 Answers

Multiple object Selection in project view: Unity shows wrong type 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