Skip to content

C# Preview

S2NX7 edited this page Sep 30, 2025 · 2 revisions

C# Preview Window

The C# Preview Window is a Unity Editor tool for previewing generated C# code from Visual Scripting assets, including graphs, code assets, and GameObjects with FlowMachines/ScriptMachines. It allows you to inspect, search, navigate, and copy code easily.


How to Open

  • From the Unity menu:
    Window > Community Addons > C# Preview

Features & Usage

Asset Preview

Select a supported asset (ScriptGraphAsset, CodeAsset, or GameObject with a ScriptMachine component) in the Unity Editor.

The window automatically updates to show the generated C# code.

Searching

Use the Search box in the toolbar to find lines containing specific text.

Navigate matches with the < and > buttons.

Zoom

Adjust the zoom level with the Zoom slider in the toolbar to scale text for easier reading.

Selection & Copying

Click a line or a code region to select it. If the code you clicked is being Generated by a Unit it will take you to the Unit in the Graph.

Double-click selects a line; triple-click selects all code.

Use Copy to Clipboard to copy selected lines or all code.

Compilation

Click Compile in the toolbar to compile the currently previewed asset.

Component Navigation (GameObjects)

If a GameObject has multiple ScriptMachine components, use the < and > buttons in the toolbar to switch between them.

Refresh

Click Refresh to reload the code preview if the asset/code has changed.

Settings

Click Settings in the toolbar to customize the display or behavior settings.

Clone this wiki locally