# Spawnable

## Usage

Spawnables are the way AnyRPG deals with the need for physical objects in the world to appear or disappear as the game story progresses.  There is no limitation to what can be spawned, from small things like shrubs or trees, up to entire buildings.

## Properties

| Name                    | Description                                                                                                                                                           |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prefab Profile Name     | A [Prefab Profile](/scriptable-objects/prefab-profile.md) containing a link to a Prefab that will be spawned.                                                         |
| Spawn Delay             | The amount of seconds to delay spawning the prefab once all the [Prerequisites](/shared-properties/prerequisite-conditions.md) are met and the object can be spawned. |
| Spawn Reference         | If the Interactable does not spawn any objects, but instead is always visible, link the GameObject in this field.                                                     |
| Despawn Object          | If true, and there is an object spawned, and the *Prerequisite Conditions* are no longer met, despawn it.                                                             |
| Prerequisite Conditions | [Prerequisite Conditions](/shared-properties/prerequisite-conditions.md) that must be satisfied for the object to spawn.                                              |

## Dependencies

* Spawnable does not have any dependencies, and can be placed on a Prefab with no other components.


---

# 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.anyrpg.org/monobehaviours/spawnable.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.
