cocos_add_widget
Attach a widget component to Cocos Creator nodes for screen-anchor layout using bitmask alignment flags, enabling precise UI positioning without manual coding.
Instructions
Attach a cc.Widget for screen-anchor layout. align_flags is a bitmask.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| align_flags | No | ||
| target_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |