add_pcg_component
Attach a procedural generation component to an actor and optionally assign a PCG graph, turning a plain actor or volume into a rule-based scatterer of meshes and points.
Instructions
Attach a PCG component (the procedural generation engine) to an actor and optionally point it at a PCG graph -- what turns a plain actor or volume into something that scatters meshes and points by rule. Idempotent: an actor that already has one gets it back. The component generates within the actor's BOUNDS, so on a volume with no brush geometry it produces zero instances with no error at all -- confirm the extent with get_actor_bounds first. Then run generate_pcg_component and inspect with get_pcg_component_info.
Returns: { actor_name, component_name, already_existed, graph_path, graph_assigned }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Display label or internal name of the target editor-world actor (required) | |
| pcg_graph_path | No | Optional /Game/... path of a UPCGGraph to assign to the component |