[Solved] Limiting asset search in Unity Editor for a script

I’m working on a script that plays specific sound files in order, one after the other. The script creates an array and then the user manually fills that array in with sound files in the Unity Editor. The problem is that when choosing a sound file to use, unity pulls up every sound file in the project. I know that you can manually filter the search, but that can still get tedious with many files.

I was wondering if there was a way to make the script limit the search to a specific folder instead of the whole project, so that it only pulls up the relevant audio files.

Thanks for your help!

If you have a folder with sound files in it and you want those sound files, just bring up that folder in the project window and then drag and drop your audio files into the array.

Unless I’m misunderstanding something?

Ah sorry, maybe I should have explained the purpose of the script a little better. I recorded a bunch of sound files of different words (“the, and, hello” etc). You load those words into the array, which is then played in order, forming a sentence. So i basically want to limit my search to those word files instead of all sound files in the project. Just in case it isn’t clear, this is the search window that I want limited:

3288868--254634--audioselect.png

The window you are using is triggered by the little target icon, honestly I’m not sure if there is a way to filter that by folder.

But, I’m still not understanding why the drag and drop method doesn’t work? Are the audio files you want to use just in many different folders so hunting around takes a bit?

Yeah I couldn’t find anything about it, I figured I’d just give it a shot here. The problem is that I have the words recorded with a few different sounding voices. For instance “the” would be named “Robo_High_the” and “Robo_Mid_the” and “Robo_Low_the”. All of the Robo_High sounds are in one folder, all of the Robo_Low sounds are in another, etc.

So when I type “the” into the search bar, it will bring up all of those results, making it difficult to find exactly what you want. It’ll also pull up any other audio file with “the” anywhere inside of it. I just want a way to make this process a bit more organized and streamlined because with multiple voices, the search gets real cluttered real fast.

I don’t think drag and drop will work because I don’t want all of the words loaded into an array at once, just the ones I choose for a sentence.

So why not just add the ones you want to make the sentence with drag and drop?

Ohhhhhhh lord, I just understood what you were trying to say. I can use the project tab and search within specific folders there, then drag and drop from there. That’s exactly what I wanted, thank you!