constraints
Skill15 starsChanged 5 months agoMITView on GitHub
Skill for AI agents driving Unity animation constraints (PositionConstraint / RotationConstraint / AimConstraint / ParentConstraint / ScaleConstraint) and Level-of-Detail groups (LODGroup) in a project through the unity-open-mcp MCP server. This domain is embedded in the bridge and opt-in. Its tools use the built-in engine modules (UnityEngine.AnimationModule for the constraint components, UnityEngine.CoreModule for LODGroup) — no Unity package install is required, and they compile into every bridge build. Its tool group is hidden from ListTools until the connected session activates it.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- domengabrovsek/agent-configtheir own version, first seen Oct 2, 2026
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- gener8v/gener8v.claude-skillstheir own version, first seen Sep 15, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- domengabrovsek/agent-config★ 17same name
- aws-solutions/konductor★ 9same name
- gener8v/gener8v.claude-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- demo/AGENTS.mdAGENTS.md
- hub/AGENTS.mdAGENTS.md
- mcp-server/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- animationSkill
- audioSkill
- cinemachineSkill
- input-simulationSkill
- inputsystemSkill
- lightingSkill
- memoryprofilerSkill
- navigationSkill
- particlesystemSkill
- probuilderSkill
- shadergraphSkill
- splinesSkill
- spriteatlasSkill
- terrainSkill
- textureSkill
- tilemapSkill
- timelineSkill
- uiSkill
- vfxSkill
- unity-open-mcpSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
All three tools are mutating and accept the standard paths_hint.
- Very specific: line 40
Every mutating tool requires a non-empty paths_hint scoped to the host scene path — the gate has no whole-project fallback.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Unity Open MCP — Constraints & LOD Extension
Skill for AI agents driving Unity animation constraints (PositionConstraint /
RotationConstraint / AimConstraint / ParentConstraint / ScaleConstraint)
and Level-of-Detail groups (LODGroup) in a project through the unity-open-mcp
MCP server.
This domain is embedded in the bridge and opt-in. Its tools use the built-in engine modules (
UnityEngine.AnimationModulefor the constraint components,UnityEngine.CoreModuleforLODGroup) — no Unity package install is required, and they compile into every bridge build. Its tool group is hidden fromListToolsuntil the connected session activates it.
Preconditions
- Unity Editor is open with the target project.
unity_open_mcp_pingreturnsconnected: true.- The
constraintstool group is activated — callunity_open_mcp_manage_tools(action="activate", group="constraints")before invoking any Constraints & LOD tool. Fresh sessions start with two default-on groups (coreandgate-and-verify); activate the other groups you need on demand. Because these types are built-in,capabilitiesalways reports theconstraintsgroup asavailable: true(nodomainDefine).
Tool prefixes
Two prefixes share the constraints group (one group covers both concerns —
they are small and closely related):
unity_open_mcp_constraint_add— add an animation constraint component to a host GameObject.unity_open_mcp_lod_group_configure— configure aLODGroupon a host.unity_open_mcp_lod_add_level— add or replace aLODentry at an index.
All three tools are mutating and accept the standard paths_hint; they run
the full gate path. There are no read-only members in this group — read
constraint / LODGroup state with unity_open_mcp_component_get.
Every mutating tool requires a non-empty paths_hint scoped to the host scene
path — the gate has no whole-project fallback.
Canonical workflow: an aim constraint
- Discover —
unity_open_mcp_component_list_all(filterAimConstraint) orunity_open_mcp_gameobject_findto locate existing hosts. Address any host byinstance_id>path>name. - Add the constraint —
unity_open_mcp_constraint_addon the host withconstraint_type: "AimConstraint",source_path(orsource_instance_id/source_name) pointing at the target to aim at,weight(0-1, default 1),constraint_active(default true). Returns the added constraint's state. Idempotent — re-using an existing constraint of the same type reportsadded:false(source / weight / activation are still applied). - Tune it —
unity_open_mcp_component_modifyfor fields this pack does not surface directly (e.g.aimVector/upVectoronAimConstraint,rotationAxesonRotationConstraint, per-source weights via the sources array).
Constraint types
constraint_add supports these constraint_type values:
constraint_type | Constrained property | Notes |
PositionConstraint | position | Tracks the source's position. |
RotationConstraint | rotation | Tracks the source's rotation. |
AimConstraint | rotation (aim) | Aims at the source; set aimVector / upVector via component_modify. |
ParentConstraint | position + rotation | Parents to the source (no actual reparent). |
ScaleConstraint | local scale | Scales toward the source's scale. |
LookAtConstraint is the legacy non-IConstraint variant and is intentionally
omitted — only the five IConstraint-derived types above are supported. The
tool returns invalid_constraint_type for any other name.
Source + weight + activation
source_path/source_instance_id/source_name— the constrained-to target. Resolved to a GameObject; itsTransformis taken (constraints source off Transforms). Optional — you can add the component first and wire the source later viacomponent_modify.weight— the source weight (0-1, clamped). Applied as the per-source weight on the seededConstraintSource. Ignored when no source is provided.constraint_active— whether the constraint is active after add (default true). A constraint can be added inactive (constraint_active: false) so you can finish wiring before it takes effect.
Canonical workflow: a LOD group
- Add the LODGroup —
unity_open_mcp_lod_group_configureon the host GameObject (the root that owns the LOD children). Optional:fade_mode(None|SpeedTree|CrossFade— omit to leave the existing value),animate_cross_fading(default false),lod_count(allocates the LOD array with that many levels; renderers start empty). Idempotent — re-using an existing LODGroup reportsadded:false(configuration still applied). - Wire each level —
unity_open_mcp_lod_add_levelper level. Passindex(within the array → replace; ==lodCount→ append),screen_relative_transition_height(0-1, clamped), andrenderers(an array of GameObject paths — each must carry aRenderer, usually aMeshRendereron a child mesh). Entries that fail to resolve are reported inunresolvedRenderers. - Verify —
unity_open_mcp_component_geton the LODGroup, orunity_senses_screenshot(view:"scene") to see the LOD fade in the Scene view.
LOD array shape
Unity's LOD array must be sorted descending by
screenRelativeTransitionHeight, and the last level is implicitly the "culled"
band (height 0). When you allocate via lod_count, the tool seeds descending
placeholder heights (e.g. lod_count: 3 → 0.67, 0.33, 0.0) so SetLODs
accepts the array. Replace each level's height via lod_add_level to match
your art-authored thresholds.
lod_count is capped at 8 (Unity's LODGroup maximum). The tool returns
invalid_lod_count for 0 or > 8.
Common recipes
Aim a turret at a target
constraint_addon the turret GameObject withconstraint_type: "AimConstraint",source_pathpointing at the target,weight: 1,constraint_active: true.component_modifyon the turret withcomponent_type: "AimConstraint",fields_json: "[{\"field\":\"aimVector\",\"value\":\"0,1,0\",\"type\":\"vector\"}]".
Pin a prop to a bone (no reparent)
constraint_addon the prop withconstraint_type: "ParentConstraint",source_pathpointing at the bone. The prop stays in its own hierarchy slot but follows the bone's position + rotation.
Three-tier LOD on a character
lod_group_configureon the character root withlod_count: 3,fade_mode: "CrossFade",animate_cross_fading: true.lod_add_levelwithindex: 0,screen_relative_transition_height: 0.6,renderers: ["Character/LOD0"](the high-poly mesh).lod_add_levelwithindex: 1,screen_relative_transition_height: 0.2,renderers: ["Character/LOD1"](the mid-poly mesh).lod_add_levelwithindex: 2,screen_relative_transition_height: 0.0,renderers: ["Character/LOD2"](the low-poly mesh — culled below 0).
Agent-sense pairing
unity_open_mcp_component_getreads the raw constraint / LODGroup fields after a mutate (complementary to the structured state returned by the constraint tools).unity_senses_screenshot(view:"scene") visually confirms the LOD fade in the Scene view (the LOD gizmo draws the transition spheres).
Tool reference
| Tool | Mutating | Lifecycle | Notes |
constraint_add | yes | editor_settle | Idempotent per type — re-using reports added:false. Optional source + weight + activation. |
lod_group_configure | yes | editor_settle | Idempotent — re-using reports added:false. Allocates the LOD array when lod_count is set. |
lod_add_level | yes | editor_settle | Replace-in-place (index < lodCount) or append (index == lodCount). |
Address every target by instance_id > path > name (same model as
gameobject_* / component_*). Every mutating tool requires a non-empty
paths_hint scoped to the host scene path — the gate has no whole-project
fallback.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

