Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
7
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.
Sign in to like and favorite skills
Execute C# code dynamically in Unity Editor.
uloop 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 |
Write direct statements only (no classes/namespaces/methods). Return is optional.
// 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!"");'
Returns JSON with execution result or compile errors.
For file/directory operations, use terminal commands instead.
For detailed code examples, refer to these files: