Right now typing t:script also shows returns .dll files in the search results. Is there any way I can make it only return .cs files?
If you’re referring to the “QuickSearch” feature, which can be opened through the CTRL-K (on windows, obviously, IDK the OSX counterpart, maybe Command+K but I’m not sure) or Window/Search/New Window, then you can search simply using *.cs and it will search for files. If you put *.cs Game then it will give all the .cs files with “Game” in them.
No, I was referring to the “normal” search (the search field on the project window), because I never found QuickSearch to offer me anything I actually wanted (and am slightly baffled by its existence).
But, it’s good that it’s possible on QuickSearch. but QuickSearch doesn’t allow to ctrl+a and select all, so it won’t do. (Edit: correction, one of the views allows for ctrl + a to select all, but it doesn’t allow to open them from there, so it’s still useless… I don’t understand why each view has different behavior).
I guess I’ll stick to using Everything for that.
[extra keyword if you want] .cs t=MonoScript This worked for me in the Project window too.
I switched to the QuickSearch for a while now, it’s just better for my general use-cases and knows much more than the project search.
Does it? Can I search for example if a texture has Mirror Once wrap mode?
That’s interesting. I’m in 2021.2 though. And seeing this:

And then this:

Open up the Window/Search/Search Index Manager:

You can choose if you want to search subobjects and properties. But this takes the actual serialized objects and index them, so you may find them under different names. You can find the found keywords under keywords. Then you can filter based on <keyword>=<value> or <keyword> < <something> or <keyword> > <something> or something similar.
I’m also on 2021.2 and it still doesn’t work on the project window.
Let me rebuild the index and I’ll try again.
This works:

But this doesn’t…

Not sure what’s up.
The properties thing is useful though. Searching for mirror once is a bit verbose and unintuitive, but it sure is faster than writing a script to do it, so points to QuickSearch for that

AFAIK you can use the enum names too. Like Clamp, MirrorOnce, etc.
Hi @jonathans42 ! Could you please take a look at this thread? We aren’t sure what’s happening between our two 2021.2 searches (maybe you have some idea what’s happening) and the texture wrapMode and other similar properties may deserve an abstraction? Anyway, thanks! Sorry for the summon!
I do not recommend enabling sub objects unless you really want to index all your scene and prefab objects (which can me the index grow really quickly depending on your project).
Make sure you have the Project Browser Search Engine setup to use Advanced if you want the new search engine integration in the project browser. You can find that settings in the Search Preferences.
We do abstract it for Vector2,3,4, we should maybe do it for other types too. That said, we have a CustomIndexer API if you want to index those special cases yourself. See https://docs.unity3d.com/2021.2/Documentation/ScriptReference/Search.CustomObjectIndexerAttribute.html
I did check that.
.cs t=MonoScript doesn’t work, it returns nothing.
t=MonoScript .cs does work though.
You are right, it does work in the Search Window

But it doesn’t work in the project browser. Maybe there is a special query parsing in the project browser and the . at the beginning is causing the issue.
Do you mind logging us a bug so we can prioritize it and fix it ASAP. Please add in the bug report a link to this forum thread.
Thanks,
Also, side note, if you only want files ending with .cs you can do \.cs$ which will run a regex on all file path for files ending with .cs

or p: ext:cs. This version filters out file with the extension cs using an indexed property.

The only thing we didn’t compare is OS, I’m on Windows and I’m guessing @AcidArrow is on OSX? Maybe that’s the root of the difference?
That could be it indeed. I would need to do some more testing. In all cases, logging us an issue will help make sure we do not forget and make sure to indicate the platform and version on which you repro.
I’m on Windows 10.
I have a policy of only submit bug reports for things I consider show stoppers in making my game and this isn’t one those.
So I will not be submitting a bug report for this one, I’m sorry.
