# Store Browser

The **Store Browser** is a UI helper that renders your store's categories and packages on a canvas, with branding and customization options available.

{% hint style="info" %}
The built-in store browser requires using Unity's Canvas system and TextMeshPro.
{% endhint %}

<figure><img src="https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F0LXQR0JQX81uWzLm29tl%2Fimage.png?alt=media&#x26;token=e88f9a81-57b4-43ba-b661-896765ab3ed7" alt=""><figcaption></figcaption></figure>

This guide shows you how to setup and enable the store browser in your game.

### Editor Setup and Usage

1. Ensure you have Tebex installed to **Assets/Tebex** in your Unity project.
2. Create an empty `GameObject` to contain Tebex scripts, or attach to any existing object you use for global state.
3. Add **Assets/Tebex/TebexUnity/StoreBrowser.cs** as a script component
4. Configure the browser as desired in the Inspector.
   1. You must at minimum set the `Store Public Key` and `Canvas` in order to download the store's packages and display them.
5. Open the browser in-game when needed by calling its `Open()` function.

### Customization

<table><thead><tr><th width="242.562255859375">Option</th><th>Description</th></tr></thead><tbody><tr><td>Store Public Key</td><td>The Public Key for your game's associated Tebex store</td></tr><tr><td>Canvas</td><td>The Canvas we will draw the UI on. You must create and configure this Canvas per your specifications.</td></tr><tr><td>Use In Game Cart</td><td><strong>True</strong> to use the in-game cart with the Store Browser. You must attach the In-Game Cart script and object.</td></tr><tr><td>Cart</td><td>The object containing the in-game cart script.</td></tr><tr><td>Store Icon</td><td>An icon shown for your store/game.</td></tr><tr><td>Background</td><td>A background to draw on the canvas, if any.</td></tr><tr><td>Store Text Color</td><td>The color to render store text.</td></tr><tr><td>Store Font</td><td>The font to use for store categories, navigation, and buttons.</td></tr><tr><td>Product Header Font</td><td>The font for package headers.</td></tr><tr><td>Product Font</td><td>The font for package descriptions.</td></tr><tr><td>Header Text Size</td><td>Size in pixels of the header text.</td></tr><tr><td>Store Text Size</td><td>Size in pixels of the store text.</td></tr><tr><td>Store Packages Per Row</td><td>A best-effort number of packages to render per-row. Affects sizing of each package cell.</td></tr><tr><td>Store Refresh Interval Minutes</td><td>Tebex will refresh your store's available categories and packages at this interval. Otherwise, it will cache them to prevent repeated web requests.</td></tr></tbody></table>

### Usage without In-Game Cart

If you configure `Use In Game Cart` to `true`, the generated UI will have a **Webstore** button in place of a **Basket** button. Clicking the button will direct the user to the

Clicking a Package's price to add it to the cart will instead open a direct checkout link in the user's default browser.


---

# 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.tebex.io/developers/unity-engine/features/store-browser.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.
