Skip to main content

manage_physics_materials

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: physics  ·  Module: services.registry.capability_adapter

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

Description​

Create, configure and assign physics materials.

Parameters​

NameTypeRequiredDescription
actionLiteral['create_physics_material', 'configure_physics_material', 'assign_physics_material']yesFeature action to perform.
dimensionstr | None—Physics dimension: '3d' (default) or '2d'.
namestr | None—Name for new physics material.
pathstr | None—Asset path for materials.
dynamic_frictionfloat | None—Dynamic friction (0-1).
static_frictionfloat | None—Static friction (0-1).
bouncinessfloat | None—Bounciness (0-1).
frictionfloat | None—Friction for 2D materials.
friction_combinestr | None—Friction combine mode: Average, Minimum, Multiply, Maximum.
bounce_combinestr | None—Bounce combine mode: Average, Minimum, Multiply, Maximum.
material_pathstr | None—Path to physics material asset for assign.
targetstr | None—Target GameObject name or instance ID.
collider_typestr | None—Specific collider type to target.
search_methodstr | None—Search method for target resolution.
propertiesdict[str, Any] | None—Direct property dict for joints or materials.
component_indexint | None—Zero-based index to select which component when multiple of the same type exist (e.g., multiple HingeJoints or BoxColliders). If omitted, targets the first instance.
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​

Create a low-friction 3D physics material at a fresh path under an existing folder. Assign the material to a collider separately with assign_physics_material.

MCP arguments
{
"action": "create_physics_material",
"dimension": "3d",
"name": "PrototypeIce",
"path": "Assets/Physics/PrototypeIce.physicMaterial",
"static_friction": 0.05,
"dynamic_friction": 0.05,
"bounciness": 0
}