> For the complete documentation index, see [llms.txt](https://speedtutoruk.gitbook.io/door-interaction-kit-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://speedtutoruk.gitbook.io/door-interaction-kit-doc/getting-started/how-to-create-a-key.md).

# How To Create a Key

<figure><img src="/files/Qfc0RAJ8RBUIXywilJ1C" alt="" width="188"><figcaption></figcaption></figure>

### Creating Key ScriptableObject

{% hint style="info" %}

1. You can create a ScriptableObject by righting click the hierarchy and creating a **Key** object
   1. **Key Name:** Add the keys name here
   2. **Key Sprite:** Add the sprite to use for the key object
   3. **Key ID:** A unique indentifying number to be used as saving information for the inventory
      {% endhint %}

{% hint style="warning" %}
NOTE: Make sure all key scriptables are inside the **RESOURCES** folder, this will allowing the saving functionaity to work as intended.
{% endhint %}

<figure><img src="/files/nM9hZRx62pxjfTDxQacR" alt=""><figcaption></figcaption></figure>

### Creating Key Collectable

{% hint style="info" %}

1. Add a 3D object of a key to your scene and make sure it is setup as below:&#x20;
   1. **Box Collider**
   2. **InteractablePrompt** script (Optional Component)
2. **Key Collectable** script
   1. **KeyScriptable:** Add the relevant ScriptableObject to this slot
   2. **Pickup Sound:** Add a pickup sound of your choice
      {% endhint %}

<figure><img src="/files/CMGHAKiEuemvaIzfJmM1" alt=""><figcaption></figcaption></figure>


---

# 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://speedtutoruk.gitbook.io/door-interaction-kit-doc/getting-started/how-to-create-a-key.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.
