Finding assets with spaces in their name

How do I find a specific asset in a folder (or subfolder) which contains a space in the name? The following code returns all variations that start with “my”.

string[] lookFor = new string[] { folderName };
string assetName = "my name";

if (AssetDatabase.IsValidFolder(folderName)
{
  string[] textureGUIDArray = AssetDatabase.FindAssets(assetName + " t:texture2D", lookFor);
}

Quotes does mean in this case single quotes (').

I don’t think this is correct. You should use the normal quotes, e.g “some asset”.

@sstrong the code seems OK. I tested your code by placing 2 different assets that begin with the same name (before the space). The code only returned 1 asset from FindAssets, so it seems to work OK. I am on 5.3.5p4 BTW.