In the Global Search window we can do a search like this: p: t=light .unity
and get the path to the scenes in the Path column.
How do we do the same using the search API?
I can execute the search and get the SearchItems, BUT:
item.ToObject is null if the scene is not loaded.
item.value contains a GlobalObjectId string, but using GlobalObjectId.GlobalObjectIdentifierToObjectSlow with the parsed id returns null.
item.data seems to contain AssetMetaInfo with a path property, but its internal.
I’m assuming anything we can do in the Global Search window can be achieved with the search API, but I can’t figure out how. An example would be very helpful!