> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/code/getting-started/setup/empty-project-before-adding-gum/stride.md).

# Stride

## Introduction

Gum can be used in Stride projects by importing Gum's `Gum.Stride` NuGet package. `Gum.Stride` renders through SkiaSharp and adds Forms input through `Stride.Input`; Stride still owns the window and the render pipeline.

## Creating a New Project

Before using Gum, you should first verify that you can create a normal windowed Stride project. For the full API reference, see the Stride documentation: <https://doc.stride3d.net/>

Stride games can be created two ways: with the Stride Game Studio editor, or as a plain console project using the Stride Community Toolkit (<https://stride3d.github.io/stride-community-toolkit/>). The steps below use the Community Toolkit, matching the Gum Stride sample.

{% tabs %}
{% tab title="Visual Studio" %}
First, create an empty console project

1. Open Visual Studio
2. Select File -> New Project, or select the **Create a new project** option in the popup window.
3. Select the option to create a **Console App**
4. Enter a name, select a location, then click **Next**
5. Select **.NET 10.0** as the **Framework**, then click **Create**

Next, add the needed NuGet package:

1. Expand your game project in the Solution Explorer
2. Right-click on **Dependencies** and select **Manage NuGet Packages**
3. Check **Include prerelease**, since the Community Toolkit publishes preview versions
4. Search for and install `Stride.CommunityToolkit.Windows`
   {% endtab %}
   {% endtabs %}

Stride's packages ship `net10.0` builds only, so your project must target `net10.0`.

Once you have your project set up, it might look similar to the following code block, which opens a window showing a lit 3D scene:

```csharp
using Stride.CommunityToolkit.Engine;
using Stride.Engine;

using var game = new Game();

game.Run(start: Start);

void Start(Scene rootScene)
{
    game.AddGraphicsCompositor();
    game.Add3DCamera();
    game.AddDirectionalLight();
}
```

The camera is required. Stride renders the scene through it, so the window stays empty without one. `Add3DCamera` matches the 3D scene above, and `Add2DCamera` is the equivalent for a 2D game.

Next, you can begin adding Gum to your project. For more information see the [Adding/Initializing Gum](/gum/code/getting-started/setup/adding-initializing-gum/stride.md) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/gum/code/getting-started/setup/empty-project-before-adding-gum/stride.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
