Advanced hierarchy search and filtering tool for Unity Editor
Smart Search enhances Unity's built-in hierarchy search with powerful filtering options, logical operators, and preset management.
- The
SmartSearchfolder should be inAssets/SmartSearch/in your Unity project - Unity will automatically compile the scripts
- Open via
Tools > Smart Searchor press Ctrl+H
- Open Smart Search -
Tools > Smart Searchor Ctrl+H - Select filter type - Choose from dropdown (Name, Tag, Layer, etc.)
- Enter value - Type or select from available options
- Click SEARCH - View results below
- Filter By: Component
- Component: Type "rigidbody" β Select Rigidbody
- Click + Add Condition
- Operator: And
- Filter By: Tag
- Tag: Enemy
- Click SEARCH
- Filter By: Static
- Is Static: β True
- Click + Add Condition
- Operator: And
- Filter By: Active
- Is Active: β False
- Click SEARCH
- Filter By: Component
- Component: Type "player" β Select Player
- Filter by Field: β True
- Field: health (from dropdown)
- Comparison: Greater
- Value: 50
- Click SEARCH
Search by GameObject name (contains match)
- Example: "Enemy" finds "Enemy_01", "EnemySpawner", etc.
Exact tag match from project tags
- Select from dropdown of existing tags
Exact layer match from project layers
- Select from dropdown of existing layers
Search for GameObjects with specific component
- Basic: Check if component exists
- Advanced: Filter by public field/property values
Component Field Filtering:
- Toggle "Filter by Field"
- Select field from dropdown (auto-populated with public fields)
- Choose comparison operator (=, !=, >, <, >=, <=)
- Enter value to compare
Filter by static flag
- True: Only static objects
- False: Only non-static objects
Filter by active state
- True: Only active objects (activeSelf)
- False: Only inactive objects
Selects all found objects in the hierarchy. Use this to:
- Batch edit properties
- Group objects
- Copy/duplicate multiple objects
Selects everything EXCEPT the search results. Useful for:
- Isolating search results by deleting everything else (in test scenes)
- Batch operations on "everything but X"
Applies blue background highlighting to results in hierarchy. Highlights persist until cleared. Good for:
- Visual reference while working
- Keeping track of specific objects
- Non-intrusive result marking
Hides all non-matching objects in hierarchy (uses HideFlags). Perfect for:
- Working in complex scenes
- Focusing on specific object types
- Reducing visual clutter
Important: Filter View modifies HideFlags.HideInHierarchy temporarily. Always use Clear when done to restore normal hierarchy visibility!
Removes all highlights and filters, restoring hierarchy to normal state.
Save Current Search:
- Build your search with filters
- Click Save Preset button
- Choose location and enter name
- Preset is saved as ScriptableObject asset in
Assets/SmartSearch/Resources/SearchPresets/
Update Existing Preset:
- Select preset from dropdown at top
- Modify filters as needed
- Click Save Preset (updates current preset)
Load to Editor:
- Select preset from dropdown at top
- Click Load button
- Filters populate in builder
- Modify and search as needed
Apply Directly:
- Find preset in bottom list
- Click Apply Filter button
- Filter View is applied immediately without needing to click Search
Delete Preset:
- Select preset from dropdown
- Click Delete button
- Confirm deletion
- Ctrl+H - Open Smart Search window
- ESC - Clear search field focus
Right-click any GameObject in hierarchy:
- Smart Search > Clear Filter - Remove active filter view
- Smart Search > Open Smart Search Window - Quick window access
Build complex queries with logical operators:
Example:
Component: Rigidbody
AND Tag: Enemy
AND NOT Layer: Ignore
This finds all enemies with Rigidbody that are NOT on Ignore layer.
Search for specific component values:
Example:
Component: Player
Filter by Field: β
Field: health
Comparison: >
Value: 50
Finds all Player components where health is greater than 50.
Supported Value Types:
- Int, Float - All comparison operators
- Bool - Equal/Not Equal only
- String - Equal/Not Equal only
- Build common searches once
- Save as presets
- Use Apply Filter for instant filtering
- Clear filter when done
- Repeat with different presets as needed
Tip: Press Ctrl+H anytime for instant access!
- Check Console for errors
- Ensure scripts are in
Assets/SmartSearch/Editor/folder - Try reimporting the package
- Make sure component name is spelled correctly
- Use the dropdown auto-complete feature
- Component must inherit from
UnityEngine.Component
- Use Clear button in Smart Search window
- Or use context menu:
GameObject > Smart Search > Clear Filter - If HideFlags persist (rare), restart Unity
- Ensure
Assets/SmartSearch/Resources/SearchPresets/folder exists - Check folder write permissions
- Unity will create folders automatically if missing
- Only public fields and properties are shown
- Field must be instance member (not static)
- Refresh by reselecting the component
- Name presets clearly - Use descriptive names like "All_Enemies_With_AI"
- Use prefixes - Organize presets by category (ENV_, CHAR_, SYS_)
- Clean up regularly - Delete unused presets to keep list manageable
- Clear filters regularly - Don't leave Filter View active when not needed
- Use highlights for reference - Highlights are less intrusive than filters
- Save common searches - Build a preset library for your project
- Combine with Unity tools - Use alongside Scene view filters and gizmos
- Filter View works efficiently even with 1000+ objects
- Component field search may be slower on very large scenes
- Use specific filters to narrow results quickly
- Find all trigger colliders:
Component: BoxCollider + Tag: Trigger - Lights on specific layer:
Component: Light + Layer: Environment - Disabled spawn points:
Tag: SpawnPoint + Active: False
- Inactive objects:
Active: False - Static objects by mistake:
Static: True + Tag: Dynamic - Objects with low health:
Component: Health + Field: currentHealth < 30
- All rigidbodies:
Component: Rigidbody - Heavy renderers:
Component: MeshRenderer + Layer: Environment - Find and batch process: Search β Select All β Batch Edit
- Unnamed objects:
Name: GameObject - Untagged objects:
Tag: Untagged - Test objects:
Name: Testβ Select All β Delete - Debug objects:
Name: Debug OR Name: Temp
SmartSearch/
βββ Editor/
β βββ SmartSearchWindow.cs - Main editor window
β βββ SearchEngine.cs - Search logic & query parser
β βββ SearchQuery.cs - Query data structures
β βββ SearchPreset.cs - Preset ScriptableObject
β βββ HierarchyHighlighter.cs - Hierarchy highlighting
β βββ HierarchyFilterView.cs - Filter view system
β βββ ContextMenuExtension.cs - Context menu integration
βββ Resources/
βββ SearchPresets/ - Saved presets location
- Unity Version: 2020.3 or higher
- Platform: Editor only (no runtime components)
- Dependencies: None
Search Engine:
- Scans all GameObjects in scene using
Object.FindObjectsByType<GameObject> - Evaluates each object against filter conditions
- Uses reflection for component field access
- Returns list of matching objects
Highlight System:
- Uses
EditorApplication.hierarchyWindowItemOnGUIcallback - Draws colored rect behind matching items
- Stores instance IDs in HashSet for fast lookup
Filter View:
- Temporarily sets
HideFlags.HideInHierarchyon non-matching objects - Automatically refreshes on hierarchy changes
- Clears all flags when disabled
Presets:
- Stored as ScriptableObject assets
- Contains query string representation
- Can be shared across team via version control
- Quick access - Ctrl+H from anywhere in Unity
- Double-click results - Quickly ping objects in hierarchy
- Chain searches - Search β Filter View β New Search on filtered results
- Preset organization - Use prefixes in preset names (e.g., "ENV_", "CHAR_")
- Hotkey workflow - Ctrl+H β Build filters β Search β Apply action β Clear
- Component discovery - Type a few letters in Component search to explore available components
- Save before Filter View - Always save scene before using Filter View extensively
- Backup presets - Presets are assets, include them in version control
- Component field search only works with public fields/properties
- Filter View uses HideFlags (doesn't work like Unity's native search field)
- Maximum of ~50 filters per query recommended (performance)
- Complex component hierarchies may need multiple searches
- Prefab overrides are not considered in searches
- Initial release
- Visual query builder
- 6 filter types (Name, Tag, Layer, Component, Static, Active)
- Component field value filtering
- Logical operators (AND, OR, NOT)
- 4 result actions (Select All, Select Inverse, Highlight, Filter View)
- Preset system
- Context menu integration
- Keyboard shortcuts
If you encounter issues:
- Check Console for error messages
- Verify all files are in correct folders
- Try reimporting the package
- Restart Unity if problems persist
For feature requests or bug reports, please contact support.
Happy Searching! π
