> For the complete documentation index, see [llms.txt](https://tariksavas.gitbook.io/tarject/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tariksavas.gitbook.io/tarject/docs/how-to-use/installer/objectinstaller.md).

# ObjectInstaller

Installers that we do not want to be present in the scene and that we call from another `GameObjectInstaller` must be derived from this class. The relevant installer is created by calling the `CreateAndInstall` method from GameObjectInstaller. The relevant container is also sent as a parameter.

Sample uses:

```csharp
public class AppInstaller : GameObjectInstaller
{
    public override void Install(DIContainer container)
    {
        FooInstaller.CreateAndInstall(container);
    }
}

public class FooInstaller : ObjectInstaller<FooInstaller>
{
    public override void Install(DIContainer container)
    {
        container.Bind<Foo>().WithId("foo1");
        container.Bind<FooController>();
    }
}
```

```csharp
public class AppInstaller : GameObjectInstaller
{
    public override void Install(DIContainer container)
    {
        ObjectInstaller.CreateAndInstall<FooInstaller>(container);
    }
}

public class FooInstaller : ObjectInstaller
{
    public override void Install(DIContainer container)
    {
        container.Bind<Foo>().WithId("foo1");
        container.Bind<FooController>();
    }
}
```
