Skip to content

Navigation

20 tools for the navigation mesh, and Environment Query System queries with their generators, tests and options.

Back to the index.

add_eqs_generator

Destructive

Adds a UEnvQueryGenerator subclass to a UEnvQuery option. If the option has no generator yet, this becomes it; otherwise replaces. option_index names an existing option, or equals the option count to append one new empty option; a negative option_index, or one past the option count, is an error checked before anything changes.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
generator_class string yes Generator class name (e.g. "ActorsOfClass", "SimpleGrid", "PathingGrid") or full path (e.g. "/Script/AIModule.EnvQueryGenerator_ActorsOfClass")
option_index number no Optional option index to target (default 0); the current option count appends a new option, a larger index is refused

Returns: { query_path, option_index, generator_class, generator_name, replaced, saved }

add_eqs_option

Additive

Append a new empty option (no generator, no tests) after the existing options of the UEnvQuery asset at query_path and return its option_index, always the last one. Each call adds another option (not idempotent). The asset is only marked dirty, not saved (save_asset), and the append is one undo step; a query that does not load is an error. An option without a generator is skipped, with an error log, when the query runs: give it one with add_eqs_generator (which can also append the option itself when option_index equals the option count), then add tests with add_eqs_test. Inspect with get_eqs_query_info; inverse: remove_eqs_option; a new query: create_eqs_query.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)

Returns: { query_path, option_index, option_count }

add_eqs_test

Additive Idempotent

Add a test of test_class to an option of a UEnvQuery asset, after the option's existing tests. Idempotent per class: if the option already has a test of that class, that one is returned (already_existed=true) and nothing is added, so an option holds at most one test per class. option_index names an existing option, or equals the option count to append one new empty option; a negative option_index, or one past the option count, is an error checked before anything changes. Undoable as one editor transaction; marks the asset dirty without saving (save_asset). Valid classes: list_eqs_test_types; configure the test with set_eqs_test_scoring; remove_eqs_test is the inverse.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
test_class string yes Test class name (e.g. "Distance", "Trace", "Pathfinding", "Dot") or full path
option_index number no Optional option index to target (default 0); the current option count appends a new option, a larger index is refused

Returns: { query_path, option_index, test_class, test_name, test_index, test_count, already_existed } — idempotent by test class within the option

create_eqs_query

Additive Idempotent

Create an empty Environment Query System asset (UEnvQuery) named name in package_path (default /Game/EQS), with no options yet, and save it. Idempotent: a query already at that path is returned as it is, with already_exists=true and saved=false, and nothing is saved; an asset of another class there is an error. A failed save (PIE running, read-only file) makes success false with saved=false, the new query kept in memory. Then give it an option and a generator with add_eqs_generator and tests with add_eqs_test, tune them with set_eqs_test_scoring, inspect it with get_eqs_query_info and run it with run_eqs_query.

Parameter Type Required Description
name string yes Asset name for the new UEnvQuery
package_path string no Target content package path where the asset is created (default /Game/EQS)

Returns: { name, package_path, asset_path, asset_class, query_name, has_options, option_count, already_exists, saved, success, message }

diagnose_navmesh

Read-only

One-call navmesh diagnosis: reports every ANavMeshBoundsVolume (brush validity + world extent — detects the EMPTY brush = 0 bounds that yields 0 tiles), inclusion/total nav bounds, bWholeWorldNavigable, invoker-only generation + registered invokers, the RecastNavMesh MaxTiles / built (active) tile count / RuntimeGeneration, and is_spatially_loaded per volume, the nav system state (supported agents by name, nav data count, dirty flag; a world without a navigation system reports zeros, not an error), plus an actionable diagnosis list. Read-only.

Parameter Type Required Description
world string no Optional world selector: absent/'editor' (default) | 'server' (the one you want in PIE: the navmesh is SERVER-AUTHORITATIVE, so only the authoritative world has a nav system and a RecastNavMesh) | 'pie' (ambiguous: PlayWorld, else the first PIE context -- may well land on the CLIENT) | 'client' | 'pie:N' | 'game' (alias of 'pie').

Returns: { world, has_authority, nav_system_present, whole_world_navigable, generate_only_around_invokers, supported_agent_count, supported_agents:[string], nav_data_count, is_navigation_dirty, nav_bounds_volume_count, nav_bounds_volumes:[{actor_name, actor_label, is_spatially_loaded, brush_present, brush_empty, bounds_valid, bounds_extent:{x,y,z}, brush_poly_count, note}], registered_nav_bounds_count, total_nav_bounds:{valid, min:{x,y,z}, max:{x,y,z}, extent:{x,y,z}}, invoker_component_count, invoker_location_count, invoker_seed_bounds_count, recast_navmesh_present, recast:{name, runtime_generation, supports_runtime_generation, max_tiles, active_tile_count, tile_size_uu, is_spatially_loaded}, diagnosis:[string], success, world_name, world_package, world_type, net_mode, pie_instance }. On a CLIENT world (has_authority=false) the heuristics are suppressed and `diagnosis` says so first: a client with no nav system / no RecastNavMesh is EXPECTED, and rebuild_navigation is NEVER recommended from there.

diff_collision_channels

Read-only

Aligns this project's custom collision channels with another project's config BY NAME and reports index shifts (which ECC_GameTraceChannelN slot / TraceTypeQueryN a same-named channel moved to). Diagnoses the migration hazard where custom channels don't travel and traces silently stop hitting. Reads the other project's DefaultEngine.ini straight from disk (not loaded). Read-only.

Parameter Type Required Description
other_project_config_dir string yes Path to the OTHER project's Config directory (containing DefaultEngine.ini); the project root also works (Config/DefaultEngine.ini is tried as a fallback)

Returns: { other_ini_path, other_ini_found, aligned_by, this_channel_count, other_channel_count, shifted_count, matched:[{name, is_trace_type, channel_this, channel_other, channel_shifted, query_this, query_other, query_shifted}], only_in_this:[{name, channel, query_type}], only_in_other:[{name, channel, query_type}], success }

find_nav_path

Read-only

Find a navigation path between two world points on the navmesh, synchronously (UNavigationSystemV1::FindPathSync), and return whether one was found, whether it is partial (ends at the reachable point nearest to end), its length and cost, and its points from start to end. Use it to prove an AI can walk from A to B, or why it cannot, after rebuild_navigation; a straight-line obstacle check is raycast_scene. Read-only and idempotent. The world param picks the world (editor by default; in PIE pass "server", the navmesh being server-authoritative); agent or nav_data picks the navigation data, filter_class the query filter. No path is not an error: found=false, with the engine's query result and a note. No navigation data, a navmesh with no built tile, an unknown agent, nav_data or filter_class, or a malformed point is an error. Snap a point onto the navmesh first with project_point_to_navmesh; random destinations: get_random_reachable_point.

Parameter Type Required Description
start array yes World-space [x, y, z] (or {x, y, z}) where the path starts; it should be on or just above the navmesh (required)
end array yes World-space [x, y, z] (or {x, y, z}) where the path should end (required)
allow_partial boolean no Accept a path that stops at the reachable point nearest to end when end itself cannot be reached; default true (is_partial says which it was). false: such a query is found=false
agent string no Optional supported agent name (as diagnose_navmesh lists supported_agents) whose navigation data to query; omitted: the default navigation data. Not with nav_data
nav_data string no Optional name of the navigation data actor to query, e.g. "RecastNavMesh-Default"; omitted: the default navigation data. Not with agent
filter_class string no Optional UNavigationQueryFilter subclass: a native class name (e.g. "NavFilter_AIControllerDefault") or a Blueprint filter's path or _C name; omitted: the navigation data's default filter. One that does not resolve is an error
max_points integer no Optional cap on how many path points are serialized, a whole number (default 500; below 1 counts as 1); point_count still counts all
world string no Which world to query: absent/"editor" (default) | "server" (the PIE world with authority: the one with the navmesh in PIE) | "client" (has no navigation; an error) | "pie:N" | "pie" (ambiguous: PlayWorld, else the first PIE context) | "game" (alias of "pie")

Returns: { found: bool, is_partial: bool, query_result: "Success"|"Fail"|"Error"|"Invalid", length: number, cost: number, straight_line_distance: number, point_count: int, points:[{x,y,z}], start:{x,y,z}, end:{x,y,z}, allow_partial: bool, nav_data, agent, filter_class, note?, world, world_name, world_package, world_type, net_mode, pie_instance }

get_eqs_query_info

Read-only

Reports the composition of an Environment Query (UEnvQuery) asset without running it: each option with its index, its generator class (absent when the option has none) and its tests in order, each with index and class. Read-only: loads the asset, changes and saves nothing; an asset that does not load as a UEnvQuery is an error, and a query without options returns option_count 0. Use it to get the option_index and test_index that add_eqs_generator, add_eqs_test, set_eqs_test_scoring, set_eqs_generator_properties, remove_eqs_test and remove_eqs_option take, and to check their result. To see what the query actually selects in the level, run it with run_eqs_query; the classes to add come from list_eqs_generator_types and list_eqs_test_types.

Parameter Type Required Description
query_path string yes Asset path of the UEnvQuery (required), e.g. "/Game/EQS/EQ_FindCover" (the ".EQ_FindCover" object suffix is optional), as create_eqs_query or find_assets_by_name gives it.

Returns: { query_path, option_count, options:[{index, generator_class?, generator_path?, test_count, tests:[{index, class, path}]}] }

get_random_reachable_point

Read-only

Pick random navmesh locations reachable by path from origin within radius (UNavigationSystemV1::GetRandomReachablePointInRadius), count of them (default 1), each with its straight-line distance from origin. Use it for patrol or spawn destinations an AI can actually walk to, or to sample how far the navmesh connected to origin extends. Read-only (each call draws new points). The world param picks the world (editor by default; in PIE pass "server"); agent or nav_data picks the navigation data, filter_class the query filter. origin must be on or near the navmesh: origin_on_navmesh says whether it projects with the default query extent, and with none found found=false and a note, not an error. No navigation data, a navmesh with no built tile, an unknown agent, nav_data or filter_class, a malformed origin or a radius of 0 or less is an error.

Parameter Type Required Description
origin array yes World-space [x, y, z] (or {x, y, z}) the points must be reachable from (required)
radius number yes Search radius around origin in cm, above 0 (required)
count integer no Optional number of points to draw, a whole number from 1 to 100 (default 1; clamped); points may repeat
agent string no Optional supported agent name (as diagnose_navmesh lists supported_agents) whose navigation data to query; omitted: the default navigation data. Not with nav_data
nav_data string no Optional name of the navigation data actor to query, e.g. "RecastNavMesh-Default"; omitted: the default navigation data. Not with agent
filter_class string no Optional UNavigationQueryFilter subclass: a native class name or a Blueprint filter's path or _C name; omitted: the navigation data's default filter. One that does not resolve is an error
world string no Which world to query: absent/"editor" (default) | "server" (the PIE world with authority: the one with the navmesh in PIE) | "client" (has no navigation; an error) | "pie:N" | "pie" (ambiguous: PlayWorld, else the first PIE context) | "game" (alias of "pie")

Returns: { found: bool, origin:{x,y,z}, radius: number, origin_on_navmesh: bool, requested_count: int, found_count: int, points:[{location:{x,y,z}, distance}], nav_data, agent, filter_class, note?, world, world_name, world_package, world_type, net_mode, pie_instance }

list_eqs_context_types

Read-only

Lists the concrete EQS context classes (UEnvQueryContext subclasses, such as EnvQueryContext_Querier or EnvQueryContext_Item) loaded in this editor, sorted by name, each with its name and class path; abstract and deprecated classes are left out. Read-only reflection: takes no parameters, loads and changes nothing. Blueprint contexts appear only once their Blueprint is loaded. A context class says what a generator or test is measured from: pass its path to a context property, such as SearchCenter, with set_eqs_generator_properties. For generator classes use list_eqs_generator_types, for test classes list_eqs_test_types; get_eqs_query_info shows what a query already uses.

No parameters.

Returns: { base_class, count, types:[{name, path}] }

list_eqs_generator_types

Read-only

Lists all concrete UEnvQueryGenerator subclasses usable as EQS generators. Read-only reflection (GetDerivedClasses).

No parameters.

Returns: { base_class, count, types:[{name, path}] }

list_eqs_test_types

Read-only

Lists all concrete UEnvQueryTest subclasses usable as EQS tests. Read-only reflection (GetDerivedClasses).

No parameters.

Returns: { base_class, count, types:[{name, path}] }

project_point_to_navmesh

Read-only

Project a world point onto the navmesh (UNavigationSystemV1::ProjectPointToNavigation): the nearest navigable location within a query box of half-extent extent around point, or found=false when the box reaches no navmesh. Use it to check that a spawn point, patrol point or path start is on the navmesh, and to snap it there before find_nav_path. Read-only and idempotent. The world param picks the world (editor by default; in PIE pass "server"); agent or nav_data picks the navigation data, filter_class the query filter. Not found is not an error. No navigation data, a navmesh with no built tile, an unknown agent, nav_data or filter_class, a malformed point or an extent axis of 0 or less is an error.

Parameter Type Required Description
point array yes World-space [x, y, z] (or {x, y, z}) to project (required)
extent array no Optional half-extent [x, y, z] of the box searched around point, in cm, each axis above 0; default the navigation data's DefaultQueryExtent (50, 50, 250 unless the project changed it)
agent string no Optional supported agent name (as diagnose_navmesh lists supported_agents) whose navigation data to query; omitted: the default navigation data. Not with nav_data
nav_data string no Optional name of the navigation data actor to query, e.g. "RecastNavMesh-Default"; omitted: the default navigation data. Not with agent
filter_class string no Optional UNavigationQueryFilter subclass: a native class name or a Blueprint filter's path or _C name; omitted: the navigation data's default filter. One that does not resolve is an error
world string no Which world to query: absent/"editor" (default) | "server" (the PIE world with authority: the one with the navmesh in PIE) | "client" (has no navigation; an error) | "pie:N" | "pie" (ambiguous: PlayWorld, else the first PIE context) | "game" (alias of "pie")

Returns: { found: bool, point:{x,y,z}, projected_point?:{x,y,z}, distance?: number, vertical_offset?: number, extent:{x,y,z}, nav_data, agent, filter_class, note?, world, world_name, world_package, world_type, net_mode, pie_instance }

rebuild_navigation

Destructive

Rebuild all navigation data of the editor world (UNavigationSystemV1::Build): regenerate every navmesh tile inside the NavMeshBoundsVolumes, spawning a missing RecastNavMesh, and block until the build finishes (seconds on a large map). Call it after moving geometry or nav volumes, or after changing its settings with set_properties. Diagnose first, and check the result after, with diagnose_navmesh (active_tile_count) or get_navigation_data; place bounds with spawn_box_volume (volume_class=NavMeshBoundsVolume). rebuilt=true only means the build ran: with no bounds volume, or a locked build, the engine builds nothing. A world with no navigation system is not an error: rebuilt=false, nav_system_present=false. A repeat call rebuilds again. No undo step; the level is not saved (save_level). Editor world only, never a PIE session.

No parameters.

Returns: { rebuilt, nav_system_present, message, success, nav_data_count }

remove_eqs_generator

Destructive Idempotent

Remove the generator from one option of a UEnvQuery asset, keeping the option and its tests. The inverse of add_eqs_generator; to swap generators just call add_eqs_generator, which replaces it; to drop the whole option with its tests use remove_eqs_option, and one test remove_eqs_test. get_eqs_query_info shows each option's generator before and after. An option left without a generator is skipped, with an error log, when the query runs. One undo step; the asset is marked dirty, not saved (save_asset). Idempotent: an option that already has no generator answers removed=false and nothing changes. A query that does not load, or an option_index out of range, is an error and nothing changes.

Parameter Type Required Description
query_path string yes Asset path of the UEnvQuery, e.g. "/Game/EQS/EQ_FindCover" (the ".EQ_FindCover" object suffix is optional), as create_eqs_query or find_assets_by_name gives it (required)
option_index integer no 0-based index of the option whose generator goes, as get_eqs_query_info lists the options (default 0); out of range is an error

Returns: { query_path, option_index, removed }

remove_eqs_option

Destructive

Remove the option at option_index from a UEnvQuery asset loaded by asset path, together with its generator and all its tests; the options after it shift down one index, and option_count is what remains. One undo step puts it back. The asset is marked dirty, not saved: persist it with save_asset. A query that does not load, or an option_index out of range, is an error and nothing changes. Not idempotent: repeating the call removes the option that moved into that index, so read the indices with get_eqs_query_info first. Inverse: add_eqs_option; keep the option but drop its generator: remove_eqs_generator; a single test: remove_eqs_test.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
option_index integer yes Index of the option to remove (required)

Returns: { query_path, option_index, removed, option_count }

remove_eqs_test

Destructive

Remove the test at test_index from the option at option_index (default 0) of a UEnvQuery asset loaded by asset path; the tests after it shift down one index, and test_count is what the option keeps. One undo step puts the test back. The asset is marked dirty, not saved: persist it with save_asset. A query that does not load, or an option or test index out of range, is an error and nothing changes. Not idempotent: repeating the call removes the test that moved into that index, so read the indices with get_eqs_query_info first. Inverse: add_eqs_test; retune a test instead: set_eqs_test_scoring; a whole option: remove_eqs_option; the generator: remove_eqs_generator.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
test_index integer yes Index of the test to remove within the option (required)
option_index integer no 0-based index of the query option that holds the test (default 0).

Returns: { query_path, option_index, test_index, removed, test_count }

run_eqs_query

Read-only

Run a UEnvQuery once, synchronously, in the editor world (UEnvQueryManager::RunInstantQuery) and return status, num_items, item_type and up to max_items scored items, each with score, location and, for actor items, the actor. Use it to test a query built with create_eqs_query, add_eqs_generator and add_eqs_test; get_eqs_query_info shows its composition without running it. It changes no asset or actor and saves nothing; editor world only, never a PIE session. Generators/tests needing navigation data (SimpleGrid/PathingGrid/Pathfinding/Project/Trace) need a built navmesh (rebuild_navigation, checked with diagnose_navmesh); without it, or without a querier for Querier-relative contexts, status is not Success while success and ran stay true, with a note. No EQS manager, or a query with no usable option, answers ran=false with a note. An unknown query_path, querier_actor or run_mode is an error and the query does not run.

Parameter Type Required Description
query_path string yes Asset path of the UEnvQuery, e.g. "/Game/EQS/EQ_FindCover" (the ".EQ_FindCover" object suffix is optional), as create_eqs_query or find_assets_by_name gives it (required)
querier_actor string no Optional object name or editor label of the editor-world actor used as the query Querier (drives EnvQueryContext_Querier and Querier-relative generators), whole name, case-insensitive, first match wins, e.g. "BP_Guard_C_0"; omitted: the query asset itself, which has no location
run_mode string no "SingleResult" (the best item) | "RandomBest5Pct" | "RandomBest25Pct" (one random item scoring within 5% or 25% of the best) | "AllMatching" (every passing item, best first); case-insensitive, default "AllMatching", any other value is an error
max_items integer no Optional cap on how many items are serialized into items, a whole number (default 50; negative counts as 0); the query still evaluates all and num_items counts them

Returns: { query_path, ran, eqs_manager_present, status, is_successful, num_items, item_type, run_mode, items:[{index, score, location:{x,y,z}, actor?}], note? }

set_eqs_generator_properties

Destructive Idempotent

Set properties of the generator of one option (option_index) of a UEnvQuery asset by reflection, in one undo step; only the named properties change. Use it over set_properties, which needs the generator's object path: here a class property (SearchedActorClass, SearchCenter) takes a class path such as /Script/Engine.Pawn, checked against its base class, and an FAIDataProvider value (SearchRadius, GenerateOnlyActorsInRadius) takes {"DefaultValue": number or bool}; others take their JSON value. A property that is unknown or rejects the value lands in failed without failing the call; applied echoes each stored value. A query that does not load, an option_index out of range or an option with no generator (add_eqs_generator) is an error. Marked dirty, not saved (save_asset). Scoring: set_eqs_test_scoring; classes: list_eqs_generator_types; composition: get_eqs_query_info.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
properties object yes JSON object { PropertyName: value, ... } applied to the generator, keys as named on its class (value formats in the description)
option_index integer no Zero-based option index whose generator is edited (default 0); out of range is an error

Returns: { query_path, option_index, generator_class, set:[name], failed:[{name, error}], applied:{name: stored_value_text} }

set_eqs_test_scoring

Destructive Idempotent

Set the scoring and filter settings of test test_index in option option_index of a UEnvQuery asset, in one undo step: TestPurpose, FilterType, ScoringEquation, the FloatValueMin and FloatValueMax bounds and, only when given, ScoringFactor. The first five are written on every call, so one left out goes back to its default (Score, Range, Linear, 0, 1); the reply reads the stored values back. Values equal to the stored ones are a no-op: changed=false, a note, nothing written. A changed asset is marked dirty, not saved: persist it with save_asset. An enum name the param does not list (the error names the accepted ones), a query that does not load or an index out of range is an error, and nothing changes. Add the test with add_eqs_test; read the indices with get_eqs_query_info; generator settings: set_eqs_generator_properties.

Parameter Type Required Description
query_path string yes /Game/... path to the UEnvQuery asset (required)
option_index integer no Option index (default 0)
test_index integer no Test index within the option (default 0)
test_purpose string no "Filter" | "Score" | "FilterAndScore" (default "Score")
filter_type string no "Minimum" | "Maximum" | "Range" | "Match" (default "Range")
scoring_equation string no "Linear" | "Square" | "InverseLinear" | "SquareRoot" | "Constant" (default "Linear")
scoring_factor number no Optional weight multiplier applied after the equation (ScoringFactor.DefaultValue); only applied when provided
float_value_min number no Optional min for FloatValueMin (default 0)
float_value_max number no Optional max for FloatValueMax (default 1)

Returns: { query_path, option_index, test_index, test_name, changed, test_purpose, filter_type, scoring_equation, scoring_factor, float_value_min, float_value_max, note? }