create_procedural_grid_mesh
Build a flat welded grid mesh with X/Y vertex counts and spacing in a UProceduralMeshComponent section on an editor actor found by label, replacing or appending that section.
Instructions
Build a flat welded grid of num_x by num_y vertices spaced grid_spacing apart, centred on the component origin in its XY plane with 0-1 UVs and +Z normals, and write it into section_index of a UProceduralMeshComponent on an editor-world actor found by label, replacing that section if it exists, or appending a new one when section_index equals the section count. A missing actor or component, or a section_index that is negative or past the section count, is an error checked before anything changes. num_x * num_y is capped at 1,000,000 vertices (1000 x 1000) because each grid vertex costs about 300 bytes across the generated arrays, the section copy and the render buffers, so one call stays near 300 MB with every index far inside int32; a larger grid, or a count outside int32, is an error too. Transient: nothing is marked dirty, saved or undoable. Add the component with create_procedural_mesh_component first; create_procedural_box_mesh builds a box.
Returns: { actor_label: string, section_index: int, vertex_count: int, triangle_count: int, total_sections: int }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_x | No | Optional vertex count along X (the grid has num_x - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000 | |
| num_y | No | Optional vertex count along Y (the grid has num_y - 1 cells; below 2 there is no geometry); defaults to 10; num_x * num_y at most 1000000 | |
| actor_label | Yes | Editor label of the actor carrying the PMC | |
| grid_spacing | No | Optional grid cell size in world units; defaults to 16.0 | |
| section_index | No | Optional target section index, 0 to the current section count (which appends a new section); defaults to 0 | |
| component_index | No | Optional 0-based PMC index on the actor; defaults to 0 | |
| create_collision | No | Optional bool; defaults to false |