cocos_anchor_to_edge
Anchor UI elements to parent edges or corners with customizable margins using Cocos Creator's Widget component for precise layout positioning.
Instructions
Pin node to an edge / corner of its parent via cc.Widget.
edge: top / bottom / left / right /
top-left / top-right / bottom-left / bottom-right.
margin: distance from the edge (from both edges for corners).
Returns the Widget component id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| edge | Yes | ||
| margin | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |