> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/important-information/game-module-repository.md).

# Game Module Repository

v4.0.2

The **`GameModuleRepository`** object will be automatically created and populated. This needs to be in a "Resources" folder. Best practice: Do not move its location.

You can use this to get Game Module objects (Scriptable Objects).

{% hint style="success" %}
Access `GameModuleRepository` from anywhere:

```csharp
GameModuleRepository.Instance
```

{% endhint %}

```csharp
// Get a Game Module object
// Pass in either the name or Uid() of the object, and specify the type
GameModuleRepository.Instance.Get<Stat>(statName);
GameModuleRepository.Instance.Get<ItemObject>(gameItemObject.Uid());

// Get a List<> of the objects
GameModuleRepository.Instance.GetAll<ItemAttribute>();
GameModuleRepository.Instance.GetAll<LootItems>();

// Get a List<string> of all the ObjectTypes of a Game Module object type
GameModuleRepository.Instance.GetObjectTypes<ItemObject>();
GameModuleRepository.Instance.GetObjectTypes<ItemAttribute>();

// Get a List<> of the object of a specific ObjectType
var rarityAttributes = GameModuleRepository.Instance.GetByObjectType<ItemAttribute>("Rarity");
```
