generate_mesh_uvs
Planar-project UVs for an entire live DynamicMeshActor mesh into a selected UV channel, adding the channel if missing and overwriting it. Mesh-local Z projection; not box/region projection or unwrap.
Instructions
Planar-project UVs for the whole live dynamic mesh of a DynamicMeshActor in the editor world into channel uv_channel, overwriting it: the projection runs down mesh-local Z with 1 UV unit per cm, not fitted to 0-1. A missing channel is added first (the channel count only grows, so higher channels such as a lightmap UV1 are kept). uv_channel 8 or more, or an empty mesh, is an error checked before anything changes; uvs_generated is false (the call fails) when the engine reports an error. Idempotent, in an editor transaction, nothing saved. For box, cylinder or region projections use set_mesh_uvs_from_projection; for a real unwrap, auto_generate_mesh_uvs.
Returns: { actor_name: string, uv_channel: int, uv_channel_count: int, triangle_count: int, vertex_count: int, uvs_generated: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Label or name of the target DynamicMeshActor | |
| uv_channel | No | UV set index to write, 0 to 7, default 0 |