Uloop execute dynamic code

From kurotu/VRCQuestTools · View interactive version

Uloop execute dynamic code is an AI agent skill from the GitHub repository kurotu/VRCQuestTools. Execute C# with Unity APIs when existing uloop tools cannot inspect or edit enough. Use for scene, prefab, SerializedObject, AssetDatabase refresh/.meta generation, menu, or PlayMode automation.

How to use this skill

Skill file

Task

Execute the following request using npx --yes uloop-cli@2.2.0 execute-dynamic-code: $ARGUMENTS

For basic selected GameObject discovery or property inspection, use find-game-objects --search-mode Selected before this tool. Use this tool after the built-in inspection tools are not enough or when you need to modify Unity state.

Workflow

  1. Read the relevant reference file(s) from the Code Examples section below
  2. Construct C# code based on the reference examples
  3. For multiline snippets, write the C# statements to a temporary .csx file and execute npx --yes uloop-cli@2.2.0 execute-dynamic-code --code-file <path>
  4. Use npx --yes uloop-cli@2.2.0 execute-dynamic-code --code '<code>' only for short one-line snippets
  5. If execution fails, adjust code and retry
  6. Report the execution result

Parameters

Code Rules

Write direct statements only — no class/namespace/method wrappers. Return is optional.

using UnityEngine;
float x = Mathf.PI;
return x;

Forbidden — these will be rejected at compile time: System.IO.*, AssetDatabase.CreateFolder, creating/editing .cs/.asmdef files. Use terminal commands for file operations instead.

Output

Returns JSON:

Use npx --yes uloop-cli@2.2.0 get-logs to retrieve Debug.Log, Debug.LogWarning, and Debug.LogError messages emitted by the snippet. On Success: false, inspect CompilationErrors first. If empty, read ErrorMessage (and Logs for extra context) — the failure may be a runtime exception, security violation, cancellation, or an "execution in progress" rejection, all of which return empty CompilationErrors. Both EditMode and PlayMode are supported targets — the snippet runs in whichever mode the Editor is currently in.

Code Examples by Category

For detailed code examples, refer to these files:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.