<!-- Page: https://rustic-game-engine.pages.dev/docs/scripting/csharp/setup-and-attachment -->

# Setup and attachment

[Back to C#](https://rustic-game-engine.pages.dev/markdown/scripting/csharp.md).

1. Install .NET SDK 10 or newer on PATH. Restart the editor after changing PATH.
   Check the Project Manager’s **Settings** language tools and the editor **Console** for discovery errors. Contributors with a source checkout can optionally run `cargo xtask doctor` from `Engine/`.
2. Open your game project and scene. Select a **Part** object for this movement example.
3. Use **Programming > Object Component Script** and select C#.
   Save the asset, then attach it to the selected object using
   **Programming > Attach Existing Script** or **+ Add Component** in the Inspector.
   Create global or scene scripts through their corresponding Programming commands.
   Keep the editor-assigned Asset ID; do not edit the registry or scene files by hand.
4. Paste the [complete behavior example](https://rustic-game-engine.pages.dev/markdown/scripting/csharp/complete-behavior.md). Press **Play**, then hover or click the embedded
   Play viewport and hold **W**. The owner moves along positive Z at one unit per
   second. The Console shows **Behavior started** once. Stop Play to restore the
   authored scene. Attach to an object with a transform to see movement.

See [Complete behavior](https://rustic-game-engine.pages.dev/markdown/scripting/csharp/complete-behavior.md) for the source to paste after attaching the script.
