Read C# Script
unity_read_scriptRead Unity script files by path with line numbers and pagination, returning requested line ranges so you can inspect code before updating it.
Instructions
Read a script with line numbers, paginated. Always read before updating.
Args: path ('Assets/Scripts/X.cs'), start_line (1-based, default 1), max_lines (default 200). Returns { path, total_lines, start_line, content } — content lines prefixed 'line: code'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project-relative script path, e.g. 'Assets/Scripts/PlayerController.cs' | |
| max_lines | No | Maximum lines to return | |
| start_line | No | First line to return (1-based) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |