# Setup Guide

1. [Setup and install Game Creator 2](https://docs.gamecreator.io/gamecreator/getting-started/installation/)
2. Download and install Persistent Instances from the package manager
3. Then you can [install the example content](#installing-the-example-content)

***

### Updating Persistent Instances

When a new version of Persistent Instances is released, we recommend uninstalling the old version first.

**How to Uninstall**

Go to the Unity toolbar:\
`Game Creator > Uninstall > Persistent Instances`

After uninstalling, you can safely install the latest version.

***

### Installing the Example Content

To install example content for Inventory Extended:

1. Open the Game Creator Install Window:\
   `Game Creator > Install…`
2. In the list, locate **Persistent Instances** and check the box for **Examples**.
3. Click **Install** to add the examples to your project.

***

### Example Location

Once installed, you can find the example content here:\
`Plugins/GameCreator/Installs/Persistent Instances.Examples@1.0.0/`

***

### Session Persistence

Persistent Instances behaves the same way as **Game Creator 2’s Save System**.

Even if you do **not save the game**, instantiated objects remain stored in memory during the current play session.

If you **leave a scene and later return to it**, those objects will automatically be restored.

To **clear this stored memory**, you can use the **Reset Game** instruction. This resets the Game Creator memory and removes all stored instances.

***

### Scene Tagging

Persistent Instances automatically **tags scenes with their internal GUID** by adding a hidden component to the scene.

This GUID allows Persistent Instances to track **which instantiated objects belong to which scene**. When a save is loaded, the system uses this GUID to determine **where objects should be restored**.

Persistent Instances will only handle scenes that have been **saved after Persistent Instances was installed**

#### Important

If a scene’s GUID changes (for example by **deleting the scene’s `.meta` file**), the scene will receive a **new GUID**.

When this happens, **existing saves for that scene will no longer load correctly**, because the save data references the old GUID.

#### Manually Tagging Scenes

You can manually tag all scenes by going to:

**Game Creator → Persistent Instances → Tag Scenes**

This will add or update the hidden GUID component used by Persistent Instances.


---

# 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.fullscreen.no/info/game-creator-2-assets/persistent-instances/setup-guide.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.
