# State Classes

### Introduction

Glue creates a custom class for every state category, and a separate class for all uncategorized states. Note that previous versions of Glue used to create enumerations for states, but this behavior was changed in 2018. For details about the change, see the [post about state data](https://github.com/flatredball/FlatRedBallDocs/blob/main/glue-reference/states/broken-reference/README.md).

### Class Names

The default class for uncategorized states in an entity is VariableState . To prevent naming conflicts, the class is defined inside the generated class for the screen/entity. For example, if a Screen named **GameScreen** includes uncategorized states, then the following qualified class is generated:

```lang:c#
public class VariableState
{
    public string Name;
    public static VariableState State1 = new VariableState()
    {
        Name = "State1",
    }
    ;
    public static VariableState State2 = new VariableState()
    {
        Name = "State2",
    }
    ;
}
```

The class is an embedded class, so it must be accessed through the screen class. For example, the fully qualified name of the VariableState class would be:

```
ProjectNamespace.Screens.GameScreen.VariableState
```

States will appear in the VariableState class if they are either uncategorized.


---

# 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/states/glue-reference-state-enumerations.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.
