> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/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/flatredball/glue-reference/glue-reference-generated-code.md).

# 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](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-73cb8b5d405d5e848de57cd55486b599593477b2%2Fmigrated_media-GeneratedEntityCsFile.png?alt=media)

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](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-a32fb5f144f97164fe451fc6543cd3d3790834ad%2Fmigrated_media-GlobalContentGenerated.png?alt=media)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
