For the complete documentation index, see llms.txt. This page is also available as Markdown.

Store Browser

Render your store and items in-game with a canvas-based UI

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

The built-in store browser requires using Unity's Canvas system and TextMeshPro.

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

Option
Description

Store Public Key

The Public Key for your game's associated Tebex store

Canvas

The Canvas we will draw the UI on. You must create and configure this Canvas per your specifications.

Use In Game Cart

True to use the in-game cart with the Store Browser. You must attach the In-Game Cart script and object.

Cart

The object containing the in-game cart script.

Store Icon

An icon shown for your store/game.

Background

A background to draw on the canvas, if any.

Store Text Color

The color to render store text.

Store Font

The font to use for store categories, navigation, and buttons.

Product Header Font

The font for package headers.

Product Font

The font for package descriptions.

Header Text Size

Size in pixels of the header text.

Store Text Size

Size in pixels of the store text.

Store Packages Per Row

A best-effort number of packages to render per-row. Affects sizing of each package cell.

Store Refresh Interval Minutes

Tebex will refresh your store's available categories and packages at this interval. Otherwise, it will cache them to prevent repeated web requests.

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.

Last updated