> 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/files/file-types/glue-reference-csv/glue-reference-set-created-class.md).

# SetCreatedClass

### Introduction

By default Glue creates a new class in the DataTypes namespace for every CSV in your project. For example, consider a game where each enemy can have multiple types of attacks. Each enemy might store the attack information in its own CSV file. In this example the CSV files would be called:

1. SoldierAttackData.csv
2. OgreAttackData.csv
3. SlimeAttackData.csv
4. ZombieAttackData.csv

We will assume that each CSV file has the same columns, and we would like to have the same code handle enemy attacks regardless of which type of enemy is performing the attack. However, by default Glue will create four classes - one for each CSV. To solve this problem, we can create a common class to be used by all CSV files. This can be done by right-clicking on each of the CSV files and selecting the **Set Created Class** option.

### Example - Enemy AttackData

This example uses enemy entities which each provide their own attack data in CSV files. Each CSV has its **Created Class** set to Enemy Data.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-a78d9f91858647be5e58257f0c05d07ae0154564%2F2021-05-img_60a665dd427c4.png?alt=media)

A new class can be added in the **Created Class** window.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-3dc3c18eb2557d25f621dc6b83e99f9c6b5b4144%2F2021-05-img_60a66625c9b94.png?alt=media)

Once added, classes appear in the list below.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-a0fcdf25c03886e8cb7a30c9ee74db29521251e1%2F2021-05-img_60a6665cd57e5.png?alt=media)

This class can be used for the current CSV by selecting the class and clicking the **Use This Class** button.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-df849e7358426f402c16d8c7d42b7e1dc32a8b07%2F2021-05-img_60a66712159cc.png?alt=media)

Once a class is added, Glue generates a file for this in the DataTypes folder.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-2f79bab489a958d53d1ca6995360901147cc2eff%2F2021-05-img_60a6675f34450.png?alt=media)

The four CSVs specified above will deserialize into AttackData Dictionaries or Lists.

### Platformer Values

Glue automatically creates a class called PlatformerValues if a game includes platformer entities. Every entity will store its platformer values in instances of the common PlatformerValues class. Removing this class can cause compile errors.

### Additional Information

* [Glue:Reference:Files:Set Created Class:Generate Data Class](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php)


---

# 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/files/file-types/glue-reference-csv/glue-reference-set-created-class.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.
