Search (Beta) 2.7+¶
Efficiently search all state machine assets for exposed property values. These values can optionally be replaced with new values.
Search works by utilizing Unreal's built in indexing mechanics through the Find in Blueprints
system.
Logic Driver search was designed with narrative systems in mind, but it is possible to find or replace any property type.
Search is currently considered beta, largely because the Find in Blueprint system has several bugs - especially with indexing - that can impact the results of Logic Driver search. However the overall benefits and performance has proven useful for large narrative driven games.
Open Search¶
From the Tools
menu select Logic Driver
-> Search
(In UE4 this will be from the Window
menu)
The search window can be used as a floating window or docked in the editor.
Run Search¶
Type the word you want to search for and press enter. All state machine assets' exposed property values will be searched.
When a match is found the blueprint asset, the node it was found on, the property name, and the entire value will be available in the results tab. The value will have all occurrences of the word highlighted.
If multiple properties on the same node match they will all be displayed as different entries.
Editing Nodes¶
Each found node can be edited directly in the graph panel. Double clicking on an item in the item list will also open the containing blueprint and focus in on the current node.
Indexing¶
Newly added state machines or freshly compiled state machines should be indexed automatically, but existing assets prior to search (Pre 2.7 assets) will need to be indexed.
- Select Options
- Select Indexing and Loading
- Select Run Full Index
This will load and compile every state machine blueprint and may take some time to complete. Running a full index will respect directories set under the Asset Filters
category under the main Options menu. Setting Directories
will limit the amount of memory required and may be needed for projects heavy in state machine assets and low on system memory.
Filters¶
You can specify multiple filters to limit the search. Note this will not necessarily increase search speed.
Types¶
Selecting Types
will open a sub menu where you can specify the exact property types to search. By default it will be set to Text
types. You can change the preset or add your own types.
Replace¶
Selecting the replace checkbox or pressing CTRL H
will enable replacement.
Replacement can either be done for each selected item or for all items found in the search.
When a replacement is successfully made the node will be updated and the search list will provide a notification indicating the value has changed.
Replacing text will only replace items that were found in the previous search and will not run a new search. If the current value of the property differs from the value of the last search no replacement will be made and an error will be displayed.
API¶
Search can be programmatically used from an editor module through the Search Interface, available from the Search Module.
Limitations¶
Deferred Indexing¶
The largest limitation is multi-threaded indexing combined with deferred indexing. These are built into Unreal to improve performance of indexing on the fly. However, when you compile a blueprint there is a race condition that can cause the indexer to become stuck (regardless of Logic Driver Search). To avoid this, Logic Driver Search will disable deferred indexing but leave multi-threaded indexing on. This has proven to have the most stable results while not sacrificing too much performance.
There is an option to enable deferred indexing, and Logic Driver does try to provide an automatic work around to detect a stuck asset, but it is recommended to leave deferred indexing disabled.
Undo / Redo Indexer Updates¶
Replace and Replace All supports the undo system, but the indexer may not update until the blueprints are compiled. Starting PIE can be a quick way to compile all dirty blueprints.