Skip to main content

gameobject_placement

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: scene  ·  Module: services.registry.capability_adapter

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Preview or apply alignment and distribution of selected GameObjects.

Parameters​

NameTypeRequiredDescription
actionLiteral['placement']yesFeature action to perform.
spaceLiteral['local', 'world'] | None—Position/rotation space; local default. Scale is local only.
targetslist[str] | None—Placement: 2–128 unique selectors in explicit anchor/endpoint order.
placement_modeLiteral['align', 'distribute'] | None—Placement along one axis; align uses first target.
axisLiteral['x', 'y', 'z'] | None—Placement axis; x default.
previewbool | str | None—Placement preview defaults true; false applies a validated preview token.
preview_tokenstr | None—Placement apply: single-use native preview token, expires after five minutes.
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Preview aligning three markers on the world X axis. Replace the names with three unique scene objects. The first target is the anchor. Review the returned positions before applying a placement.

MCP arguments
{
"action": "placement",
"space": "world",
"targets": [
"Marker A",
"Marker B",
"Marker C"
],
"placement_mode": "align",
"axis": "x",
"preview": true
}