Loading...
Loading...
Execute C# code dynamically in Unity Editor via uloop CLI. Use for editor automation: (1) Prefab/material wiring and AddComponent operations, (2) Reference wiring with SerializedObject, (3) Scene/hierarchy edits and batch operations. NOT for file I/O or script authoring.
npx skill4agent add hatayama/uloopmcp uloop-execute-dynamic-codeuloop execute-dynamic-code --code '<c# code>'| Parameter | Type | Description |
|---|---|---|
| string | C# code to execute (direct statements, no class wrapper) |
| boolean | Compile without execution |
| boolean | Auto-qualify Unity types |
// Using directives at top are hoisted
using UnityEngine;
var x = Mathf.PI;
return x;| Shell | Method |
|---|---|
| bash/zsh/MINGW64/Git Bash | |
| PowerShell | |
uloop execute-dynamic-code --code 'return Selection.activeGameObject?.name;'
uloop execute-dynamic-code --code 'new GameObject("MyObject");'
uloop execute-dynamic-code --code 'UnityEngine.Debug.Log("Hello from CLI!");'uloop execute-dynamic-code --code 'return Selection.activeGameObject?.name;'
uloop execute-dynamic-code --code 'new GameObject(""MyObject"");'
uloop execute-dynamic-code --code 'UnityEngine.Debug.Log(""Hello from CLI!"");'