- Home /
Find all Objects/Scripts that access a given audio!!
Hi experts, I work on unity while using a few assets from asset store. While working on an asset, I found that an audio was played during gameplay and it changed based on my position on the map. Being new, I want to find the code or object that uses the reference and specifies conditions to play the sound. I checked with all the objects for Audio source component and didn't find a result. I have however found the exact location of the clip.
How can I find all objects or scripts that refer to an audio clip stored at a specific location? Using "FindReferencesInScene" did not yield any result.
--- I am new to Unity and am learning stuff on the go. Please reply to me as if I am a kid :confused::D
Answer by tormentoarmagedoom · May 25, 2018 at 10:33 PM
You can "think outside the box" and make a copy of the clip, change its name. Then delete the original, and wait to see a null reference error from some code line that is trying to access it.
Then make the copy audio work again following tje code.
Bye!
I did do that, but no error came along. $$anonymous$$aybe the asset creator kept if else to check for object. That's why I need help. Someone found it by going through all objects in a particular folder related to the scene... I need an easier way to find who used what and where!!
$$anonymous$$mmm... I $$anonymous$$ove the post to DEfaut section of UA, maybe someone know some "trick".
Your answer
Follow this Question
Related Questions
Play audio clip on more than one object from another gameobject 2 Answers
Truncate audio runtime 0 Answers
Intensity of sound. -1 Answers