Working with FindAssets filter.

Hi, i’m working on a unity tool and i need to find an asset named ‘Settings.asset’.
So I started trying to use FindAssets and I did this:

AssetDatabase.FindAssets("Settings t:ScriptableObject")

And at first, this worked flawly, but the problem comes when you add another asset that its called for example ASettings. This ASettings is also caught in the search, but what I want instead is only get the asset specifically called “Settings.asset”.

I found in unity API that you could put in the filter “name:Settings t:ScriptableObject” to get what I want, but it doesn’t work for some reason. When I try to use name for defining a unique name doesn’t find anything.

It can be done like this:

string fileName = "Settings.asset";
string searchFilter = $"glob:\"Assets/**/*{fileName}\""; 
string[] guids = AssetDatabase.FindAssets(searchFilter);
string[] paths = guids.Select(AssetDatabase.GUIDToAssetPath).ToArray();