> For the complete documentation index, see [llms.txt](https://fish-networking.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fish-networking.gitbook.io/docs/fishnet-building-blocks/components/serverspawner.md).

# ServerSpawner

## Description <a href="#server-and-host" id="server-and-host"></a>

The **ServerSpawner** component is a helpful tool that you can use for optionally instantiating and spawning objects as soon as the FishNet server successfully starts running (or on your own command if preferred). This is very often used to instantiate [Global Network Objects](#user-content-fn-1)[^1], which need to be instantiated at run-time instead of existing inside a scene directly.

## Settings <a href="#server-and-host" id="server-and-host"></a>

<div align="left"><figure><img src="/files/ITUEntE4A8mUOvKfSVMO" alt=""><figcaption><p>Default settings</p></figcaption></figure></div>

### :gear: **Automatically Spawn**

> This dictates whether the component will instantiate and spawn the objects as soon as the server starts, or only after you manually call `Spawn` on the **ServerSpawner** component.
>
> You can disable this if you want to manually control when these objects are spawned.

### :gear: **Network Objects**

> This is a list of the Network Objects the component will instantiate once the server starts. The order of this list is respected when instantiating the objects, and the component will attempt to use [FishNet's object pooling](/docs/guides/features/networked-gameobjects-and-scripts/spawning/object-pooling.md) for the objects if they are added to the an object pool.

[^1]: These are NetworkObjects that are added to the DontDestroyOnLoad scene and visible to all clients.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fish-networking.gitbook.io/docs/fishnet-building-blocks/components/serverspawner.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
