# In Game Cart

The **In Game Cart** is a UI helper that allows you to build and checkout a branded, customizable cart with your Tebex store's products.

{% hint style="info" %}
The In Game Cart requires using Unity's Canvas and Layouts systems with TextMeshPro.
{% endhint %}

This guide shows you how to setup and manage the in-game cart.

<figure><img src="https://924803319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaRz9HUAxrYuZsSDWhYnu%2Fuploads%2F0nqZggQtH6jV6CmAEL0e%2Fimage.png?alt=media&#x26;token=52d784d4-7989-431b-b639-30e0438f82c8" alt=""><figcaption></figcaption></figure>

### Using with Store Browser

It is not required for you to use the Store Browser with the In Game Cart. They can work independently of one another.

### 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/InGameCart.cs** as a script component
4. Configure the cart as desired in the Inspector
5. Open the cart in-game using `Tebex.InGameCart.Open()`&#x20;

### Customization

<table><thead><tr><th width="242.562255859375">Option</th><th>Description</th></tr></thead><tbody><tr><td>StorePublicKey</td><td>The Public Key for your game's associated Tebex store</td></tr><tr><td>CartCanvas</td><td>The Canvas the cart will be drawn on. You must create and assign this.</td></tr><tr><td>EnableQR</td><td>True to enable generating a QR code the user can scan to checkout using a mobile device.</td></tr><tr><td>Enable Creator Code</td><td>True to show a Creator Code box where the user can attribute the purchase to a creator. See <a href="../../headless-api/applying-discounts-creator-codes">Creator Codes</a> for more detail.</td></tr><tr><td>Enable Discount Code</td><td>True to show a Discount Code box where the user can enter a desired coupon</td></tr><tr><td>CartLogo</td><td>The logo to show on the cart, if any.</td></tr><tr><td>CheckoutBtnColorBg</td><td>Background color of the checkout button</td></tr><tr><td>CheckoutBtnColorFg</td><td>Text color of the checkout button</td></tr><tr><td>Font</td><td>The font to use on the in-game cart.</td></tr></tbody></table>


---

# 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/in-game-cart.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.
