Project Search & Replace (and its free version Project Search) have now been updated to version 1.4! This release took a little longer than expected for two reasons. First: searching Animator Controllers, Textures, and Audio Clips was more difficult than expected. Second: I kept finding little details and improving them. The next release will most likely be a usability pass, adding small refinements to the user interface.
Release Notes
FEATURE: Basic support for searching textures and audio clips.
FEATURE: Animator Controller Search — Search states, clips, and layer info.
FEATURE: Faster Search — Searches will do a better job at not searching assets that aren’t compatible with your current search.
BUGFIX: Protected internal objects could crash PSR if they were the first exposed member in a script.
BUGFIX: System.Action variables could potentially crash PSR.
BUGFIX: No longer exposing interface variables when they should not be.
BUGFIX: You can now ‘go to’ objects with negative instance ids in scenes.
BUGFIX: Fixing potential error with Animator.updateMode crashing PSR.
BUGFIX: Fixing potential crash when initializing a search from a script that had no searchable properties.
Thoughts and Ramblings
Searching and Asset Re-importing
This release required some unique features to be added. I added the ability to re-import a texture or audio clip after it has been modified by a search. Since this is Project Search & Replace and not Project Asset Re-Importer there are many texture and audio settings that are part of asset import that are not searchable. Handling the myriad potential asset import settings was a can of worms best left unopened.
Animator Controller Internals
Curious about Animator Controller internals? I didn’t think so. But using my SerializedPropertyViewer class I was able to figure out some detail. AnimatorController is an object comprised of many sub-objects, mainly AnimatorStateMachine, AnimatorState, and Motion. This differs from most other unity objects in that they are all serialized internally together. This means searching the object actually entails searching an arbitrary tree of SerializedObjects, making things much more difficult.
Search Optimizations
I use my own tool quite frequently, and part of each release cycle involves testing beta builds on *very* large projects at my day job. I have been working towards improving search functionality, and attempting to make things faster as well. A new ‘preflight check’ optimization should provide even faster search in certain scenarios. For example searching animations will no longer potentially load any prefabs or scenes, or other unrelated assets.