Skip to content

HLOD

6 tools for World Partition HLOD layers and their actors.

Back to the index.

create_hlod_layer

Additive Idempotent

Creates and saves a new UHLODLayer (World Partition HLOD layer) asset. Idempotent on re-run: an HLOD layer already at the path is returned unchanged with created=false, already_exists=true and saved=false, layer_type not applied and nothing saved; an asset of another class there is an error. Sets default streaming-grid cell_size=25600, loading_range=51200. Layer type accepts 'Instancing', 'MeshApproximate' (also 'Custom'/'CustomHLODActor'). Defaults to 'Instancing'. A failed save makes success false with saved=false. Change it later with set_properties.

Parameter Type Required Description
name string yes Name of the new HLOD layer asset
package_path string no Content folder; defaults to /Game/HLOD
layer_type string no Optional EHLODLayerType string; defaults to "Instancing"

Returns: { name: string, package_path: string, asset_path: string, layer_type: string, cell_size: int, loading_range: number, created: bool, already_exists?: bool, success: bool, saved: bool, message: string }

get_hlod_layer_actors

Read-only

Enumerate which LOADED actors in the current editor world are assigned to a given UHLODLayer (read-side of set_hlod_layer_actors). Two limits worth knowing before you trust an empty result: it only sees actors currently loaded, and it is WORLD PARTITION ONLY -- on a non-WP world it returns not_applicable=true with a note instead of a list, because there the assignment would not survive a Generate anyway.

Parameter Type Required Description
hlod_layer_path string yes Full /Game path of the UHLODLayer asset (matches against AActor::HLODLayer::GetPathName()).

Returns: { hlod_layer_path, world, is_world_partition, not_applicable, note?, total: int, actors: [{actor_name, actor_path, actor_label}] }

get_hlod_layer_info

Read-only

Read one World Partition HLOD layer asset (UHLODLayer): its layer type (Instancing, MeshMerge, MeshSimplify, MeshApproximate, Custom or CustomHLODActor) and its streaming-grid settings, cell_size and loading_range in centimetres and is_spatially_loaded. Read-only: it loads the asset and changes nothing. A path that does not load as an HLOD layer is an error. The grid fields are read by reflection because the engine deprecated them in 5.7; on a build without them they read 0 and false. Find layer paths with get_hlod_layers; change these values with set_properties, the parent with set_hlod_layer_parent, and list the actors using the layer with get_hlod_layer_actors.

Parameter Type Required Description
hlod_layer_path string yes Object or package path of the HLOD layer asset, e.g. '/Game/HLOD/HLOD_Instanced' (as get_hlod_layers lists it).

Returns: { hlod_layer_path: string, asset_path: string, name: string, layer_type: string, cell_size: int, loading_range: number, is_spatially_loaded: bool }

get_hlod_layers

Read-only

List every World Partition HLOD layer asset (UHLODLayer and subclasses) under a content folder and its subfolders, found through the Asset Registry, with each one's name, object path and layer type (Instancing, MeshMerge, MeshSimplify, MeshApproximate, Custom or CustomHLODActor). Each layer asset is loaded to read its type, but nothing is changed or saved. A folder with no layers, or one that does not exist, gives an empty list and count 0, not an error. Use it to find a layer path, then read one layer's grid settings with get_hlod_layer_info or its assigned actors with get_hlod_layer_actors; create_hlod_layer makes a new one and set_properties changes one.

Parameter Type Required Description
path string no Optional content folder searched recursively, as a long package path, e.g. '/Game/HLOD'; default /Game.

Returns: { path: string, hlod_layers: [{ name, path, layer_type }], count: int }

set_hlod_layer_actors

Destructive Idempotent

Assign a UHLODLayer to a BATCH of loaded actors in the current editor world -- or clear it from them by passing hlod_layer_path="". WORLD PARTITION ONLY: on a non-WP world it returns not_applicable=true and changes nothing. Idempotent per actor: one that already has that layer is not touched at all and comes back counted as unchanged, so the changed/unchanged/cleared split tells you exactly what really moved.

Parameter Type Required Description
actor_paths array yes JSON array of actor paths (long package paths or object paths) to assign.
hlod_layer_path string no Full /Game path of the UHLODLayer asset. Pass empty string ("") to clear.

Returns: { hlod_layer_path, world, is_world_partition, not_applicable, note?, requested: int, changed: int, unchanged: int, cleared: int, not_found: [paths], changed_actors: [{actor_path, old_hlod_layer, new_hlod_layer}] }

set_hlod_layer_parent

Destructive Idempotent

Sets (or clears) the parent UHLODLayer of a UHLODLayer and saves it. The parent chain drives nested HLOD generation (a layer's HLOD becomes an input to its parent's HLOD). Send parent_layer_path="" to clear the parent to null; omit parent_layer_path to leave it untouched. Idempotent: if the parent is already the requested value, nothing is modified/saved (changed_parent=false, saved=false). Validates against self-parent and circular parent chains (the engine's guard is editor-only and does not run headless).

Parameter Type Required Description
hlod_layer_path string yes Full /Game path to the child HLOD layer asset
parent_layer_path string no Optional full /Game path to the parent HLOD layer; "" clears to null; absent leaves it untouched

Returns: { hlod_layer_path: string, asset_path: string, parent_layer_path: string, has_parent: bool, changed_parent: bool, settings_set: bool, saved: bool, note: string? }