# Generated Code

### Introduction

One of the primary technologies that the FRB Editor uses to function is it creates generated code. Some game projects may include more generated code than hand-written code.

This section discusses the details of how generated code works. The details of generated code may be useful to you during development if:

* You have encountered a bug related to generated code
* You are interested in debugging generated code
* You are interested in creating FlatRedBall Editor plugins which generate code

### How can I see generated code?

If you are using Visual Studio then you can view all generated code in Visual Studio. All Screens and Entities will have at least one generated file.

Assuming that you have an Entity called MyEntity:

1. Open your project in Visual Studio
2. Expand the "Entities" folder in your project
3. Look for your entity (MyEntity.cs)
4. Expand the entity and you should see another file called MyEntity.Generated.cs
5. Double-click this file to see the generated code

![GeneratedEntityCsFile.png](/files/Nx4tlNV1reRV2BszLVw8)

FlatRedBall also generates a file called GlobalContent.Generated.cs which is not associated with any particular Screen/Entity. It is responsible for loading and providing access to all files added through the Global Content Files item in the FRB Editor.

This file is located in your project as well, but it is not embedded under any other files:

![GlobalContentGenerated.png](/files/Tu1ucklCw108ma5hLNns)


---

# Agent Instructions: 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:

```
GET https://docs.flatredball.com/flatredball/glue-reference/glue-reference-generated-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
