Xorin documentation

C# script generation and editing

Xorin can create and modify Unity C# scripts, ground changes in your project, and wait for fresh Unity compilation evidence before reporting a verified script change as successful.

Supported script workflows

Project-aware code discovery

Xorin can search indexed filenames and file contents, inspect a project map, suggest a script location and namespace, find references to a C# class, and estimate the blast radius of a change across code, prefabs, and scenes.

Use an explicit mention such as @PlayerController.cs when one file is central to the request.

Compilation-safe workflow

  1. Proposed script changes are staged as a request-level change set.
  2. Xorin runs preflight code analysis against the relevant Unity assemblies.
  3. The staged files are committed together and Unity performs a fresh compilation.
  4. If compilation fails, diagnostics are returned to the agent for a bounded repair attempt.
  5. If the request cannot be repaired, Xorin attempts to restore and recompile the affected scripts. It reports when rollback is unavailable or cannot be verified so you can recover manually.

Review the result

Changed scripts appear in the active checkpoint's Change Log. Expand a script entry to inspect added and removed lines before choosing Accept All or Undo All.

Current scope

The structured script workflow creates and edits .cs files and attaches compiled scripts. It does not currently provide general structured operations for moving or deleting scripts, renaming types across a project, or editing .asmdef/.asmref files as one verified refactor.

Example requests

PlanRead @PlayerController.cs, add a stamina-limited sprint without changing the current input system, and show me the plan before editing.
AgentCreate Assets/Scripts/Rotator.cs, compile it, and attach it to @selection with a configurable degrees-per-second field.