add_ism_instance
Place a mesh instance into an InstancedStaticMeshComponent at a world transform to scatter many copies cheaply without spawning an actor per copy. Requires an existing ISM component.
Instructions
Place one more instance of an InstancedStaticMeshComponent's mesh at a world transform -- the cheap way to scatter many copies of a mesh (rocks, props, vegetation) without spawning an actor each. Pair it with add_instanced_static_mesh_component to create the component first. Prefer this route over the foliage tools: scatter_foliage_in_box and add_foliage_instances both CRASH the editor in this build, and an ISM is the same code path a foliage actor and PCG use anyway.
Returns: { instance_index: int, num_instances: int }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Optional [x, y, z] scale (defaults to [1,1,1]) | |
| location | No | [x, y, z] world-space translation (required) | |
| rotation | No | PREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. Optional [pitch, yaw, roll] world rotation (defaults to zero) | |
| actor_name | Yes | Display label or internal name of the actor carrying the ISM component (required) | |
| world_space | No | Optional; if true, transform is interpreted in world space (default true) | |
| component_name | No | Optional ISM component name (defaults to the first one on the actor) |