# Factory Manager

The **Factory Manager** is a `static ScriptableObject` which means it will be active in your game without needing to be placed in your scenes.

Each `ProjectileSpawner` and each `Projectile` will register with the `FactoryManager` `OnEnable()` and unregister `OnDisable()`.

The **Factory Manager** will maintain a List<> of each of these objects, which you can access from other scripts.

{% hint style="warning" %}
Individual objects have the option to not register, so the `List<>` available is not guaranteed to be all objects.
{% endhint %}

```csharp
public static List<ProjectileSpawner> ProjectileSpawners { get; } = new List<ProjectileSpawner>();
public static List<Projectile> Projectiles { get; } = new List<Projectile>();
```

## Global Observers

[**Global Observers**](/magic-pig-games/projectile-factory/projectile-factory-documentation/observers-global-observers-and-observer-objects.md) automatically subscribe to the **Factory Manager** events. Each time a `Projectile` event is fired, the `FactoryManager` will repeat this event to all subscribed **Global Observers**.


---

# 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://infinitypbr.gitbook.io/magic-pig-games/projectile-factory/projectile-factory-documentation/factory-manager.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.
