scatter_foliage_in_box
Scatter N foliage instances randomly within a world-space box, using a seed for repeatable layouts. Warning: crashes the editor; prefer add_instanced_static_mesh_component.
Instructions
Scatter N seeded-random foliage instances of a type inside a world-space box (same seed = same layout). DANGER: measured CRASHING the editor process, the identical access violation as add_foliage_instances (UnrealEditor-FoliageEdit.dll) because both end in the same FFoliageInfo::AddInstance path -- lowering count does not help and the failure arrives disguised as "Connection reset". Use add_instanced_static_mesh_component + add_ism_instance to scatter instead, or PCG for rule-driven placement. Save your work before calling this at all.
Returns: { foliage_type_path: string, foliage_type: string, requested: int, seed: int, align_to_ground: bool, instances_added: int, instance_count_before: int, total_instance_count: int, placed_instance_count: int, instances_added_ok: bool, center: [number], extent: [number], foliage_actor: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for the random stream, default 1337 | |
| count | Yes | Number of instances to scatter, default 8 | |
| center | No | [x, y, z] box center in world space, default [0,0,0] | |
| extent | No | [x, y, z] box half-extents, default [500,500,0] | |
| align_to_ground | No | If true, place at the box top instead of random Z | |
| foliage_type_path | Yes | Full path of the UFoliageType asset |