SDK

This page describes the C# SDK for Tebex included with Unity.

Tebex.TebexUnity

Ready-to-use Unity MonoBehaviour components and a static store cache.

The highest-level namespace for most Unity developers.

Contains StoreBrowser (full store UI), InGameCart (slide-out shopping cart), Deliverables (post-purchase callback system), Tebex (static cache for store data and textures).

All components are designed to be dropped onto a GameObject and configured in the Inspector.


Tebex.Common

Shared utilities and base types used across all other namespaces.

Contains callback delegate definitions (ApiSuccessCallback, PluginApiErrorCallback, ServerErrorCallback), the three error types (HeadlessApiError, PluginApiError, ServerError), an HttpVerb enum, a JSON serialization wrapper, and a Scheduler helper. You rarely interact with this namespace directly, but its error types appear in every API callback signature.


Tebex.Headless

Client-side store API for browsing products, managing baskets, and initiating checkout.

This is the primary API namespace for Unity game clients.

HeadlessApi is the singleton entry point. It provides synchronous and Task-based async methods to fetch the Webstore, Category list, Package list, and to create and modify Basket objects.

Note that we use an adapter pattern (HeadlessAdapter / UnityHeadlessAdapter) which abstracts the HTTP layer so the API logic is testable outside of Unity's runtime.


Tebex.Plugin

For dedicated server integrations.

PluginApi authenticates with a secret key and exposes endpoints for various tasks that are normally performed on a dedicated game server or backend, such as:

  • command queue polling,

  • player lookups,

  • payment history,

  • gift card management,

  • coupon management,

  • ban management,

  • and community goal tracking.

This is intended for use on a dedicated server build or cloud function, not in the game client.


Tebex.QR

C# QR code generation and decoding

QrCode encodes HTTPS URLs into compact QR data and exposes a bool[,] module grid or raw byte[] representation for rendering.

The Utilities.QrToTexture() helper in Tebex.TebexUnity converts a QrCode into a Texture2D for display as a UI image or world-space sprite.


Tebex.Examples

Placeholder classes demonstrating how to structure integrations.

Contains stub classes intended as starting points for custom integrations. Copy and extend these for your needs. See Examplesfor Unity-specific examples.

Last updated