Skip to Content
API Reference

API Reference

Complete reference documentation for the Pixidus SDK. Use this page to quickly look up method signatures, parameters, and return types.


PixidusSDK

The main entry point for all SDK functionality.

Initialization

PixidusSDK.Init(Action onSuccess, Action<string> onError = null)
ParameterTypeDescription
onSuccessActionCallback invoked when SDK initializes successfully
onErrorAction<string>Optional callback invoked on initialization failure

Example:

PixidusSDK.Init(() => { Debug.Log("SDK initialized"); }, (error) => { Debug.LogError($"Init failed: {error}"); });

Essentials Methods

GetLocalization

string PixidusSDK.GetLocalization()

Returns the current localization/language code.

ReturnsDescription
stringLanguage code (e.g., “en”, “tr”, “fr”)

GetStreamingAssetsUrl

string PixidusSDK.GetStreamingAssetsUrl()

Returns the URL for accessing streaming assets.

ReturnsDescription
stringBase URL for streaming assets

PixidusSDK.User

User authentication and profile management.

Methods

ShowAuthModal

void PixidusSDK.User.ShowAuthModal()

Opens the authentication modal on the Pixidus website.

Only functional in WebGL builds. Logs a debug message in Editor.


GetUser

void PixidusSDK.User.GetUser(Action<PixidusUser> callback)

Retrieves the current authenticated user.

ParameterTypeDescription
callbackAction<PixidusUser>Callback with user data, or null if not authenticated

Classes

PixidusUser

public class PixidusUser { public string id; public string email; public string display_name; public string avatarUrl; public int coins; public List<PurchasedInGameItems> purchased_in_game_items; }
PropertyTypeDescription
idstringUnique user identifier
emailstringUser’s email address
display_namestringUser’s display name
avatarUrlstringURL to user’s avatar image
coinsintUser’s coin balance
purchased_in_game_itemsList<PurchasedInGameItems>User’s purchased items

PurchasedInGameItems

public class PurchasedInGameItems { public List<string> persistent; public List<string> one_time; }
PropertyTypeDescription
persistentList<string>Permanent items (skins, characters)
one_timeList<string>Consumable items (power-ups)

PixidusSDK.Data

Cloud data storage with local fallback.

Methods

SetInt

void PixidusSDK.Data.SetInt(string key, int value, Action<bool> callback = null)

Stores an integer value.

ParameterTypeDescription
keystringStorage key
valueintInteger value to store
callbackAction<bool>Optional callback with success status

GetInt

void PixidusSDK.Data.GetInt(string key, int defaultValue, Action<int> callback)

Retrieves an integer value.

ParameterTypeDescription
keystringStorage key
defaultValueintDefault value if key doesn’t exist
callbackAction<int>Callback with retrieved value

SetFloat

void PixidusSDK.Data.SetFloat(string key, float value, Action<bool> callback = null)

Stores a float value.

ParameterTypeDescription
keystringStorage key
valuefloatFloat value to store
callbackAction<bool>Optional callback with success status

GetFloat

void PixidusSDK.Data.GetFloat(string key, float defaultValue, Action<float> callback)

Retrieves a float value.

ParameterTypeDescription
keystringStorage key
defaultValuefloatDefault value if key doesn’t exist
callbackAction<float>Callback with retrieved value

SetString

void PixidusSDK.Data.SetString(string key, string value, Action<bool> callback = null)

Stores a string value.

ParameterTypeDescription
keystringStorage key
valuestringString value to store
callbackAction<bool>Optional callback with success status

GetString

void PixidusSDK.Data.GetString(string key, string defaultValue, Action<string> callback)

Retrieves a string value.

ParameterTypeDescription
keystringStorage key
defaultValuestringDefault value if key doesn’t exist
callbackAction<string>Callback with retrieved value

RemoveItem

void PixidusSDK.Data.RemoveItem(string key, Action<bool> callback = null)

Removes a specific data entry.

ParameterTypeDescription
keystringStorage key to remove
callbackAction<bool>Optional callback with success status

ClearData

void PixidusSDK.Data.ClearData(Action<bool> callback = null)

Removes all stored data for the current user.

ParameterTypeDescription
callbackAction<bool>Optional callback with success status

This permanently deletes all user data. Use with caution.


PixidusSDK.Analytics

Event tracking and analytics.

Methods

LogEvent

void PixidusSDK.Analytics.LogEvent(string eventName, string eventValue)

Logs a custom analytics event.

ParameterTypeDescription
eventNamestringEvent name/category
eventValuestringEvent value/data

Example:

PixidusSDK.Analytics.LogEvent("level_complete", "level_5");

PixidusSDK.Ads

Ad integration for monetization.

Methods

RequestRewardedAd

void PixidusSDK.Ads.RequestRewardedAd(Action<AdProgress, bool> callback = null)

Requests and displays a rewarded ad.

ParameterTypeDescription
callbackAction<AdProgress, bool>Callback with ad progress and reward status

Callback Parameters:

  • AdProgress progress - Current ad state
  • bool rewarded - true if user earned reward

RequestInterstitialAd

void PixidusSDK.Ads.RequestInterstitialAd(Action<AdProgress> callback = null)

Requests and displays an interstitial ad.

ParameterTypeDescription
callbackAction<AdProgress>Callback with ad progress

Enums

AdProgress

public enum AdProgress { Started, // Ad has started playing Finished, // Ad has finished Error // An error occurred }
ValueDescription
StartedAd playback has begun
FinishedAd playback completed
ErrorAd failed to load or play

PixidusSDK.Purchasing

In-game purchases and transactions.

Methods

Purchase

void PixidusSDK.Purchasing.Purchase(string itemId, Action<bool> callback = null)

Initiates a purchase for the specified item.

ParameterTypeDescription
itemIdstringID of the item to purchase
callbackAction<bool>Callback with purchase success status

GetAllPurchasableItems

void PixidusSDK.Purchasing.GetAllPurchasableItems(Action<List<PixidusPurchasableProductPreset>> callback = null)

Retrieves all items available for purchase.

ParameterTypeDescription
callbackAction<List<PixidusPurchasableProductPreset>>Callback with list of purchasable items

GetPurchasedItems

void PixidusSDK.Purchasing.GetPurchasedItems(Action<List<PixidusProductPreset>> callback = null)

Retrieves all items the user has purchased.

ParameterTypeDescription
callbackAction<List<PixidusProductPreset>>Callback with list of purchased items

Classes

PixidusProductPreset

public class PixidusProductPreset { public string id; public string name; public string description; }
PropertyTypeDescription
idstringUnique item identifier
namestringItem display name
descriptionstringItem description

PixidusPurchasableProductPreset

public class PixidusPurchasableProductPreset { public string id; public string name; public string description; public int price; }
PropertyTypeDescription
idstringUnique item identifier
namestringItem display name
descriptionstringItem description
priceintPrice in coins

Quick Reference Table

ModuleMethodDescription
SDKInit()Initialize the SDK
SDKGetLocalization()Get current language
SDKGetStreamingAssetsUrl()Get streaming assets URL
UserShowAuthModal()Show login dialog
UserGetUser()Get current user
DataSetInt()Store integer
DataGetInt()Retrieve integer
DataSetFloat()Store float
DataGetFloat()Retrieve float
DataSetString()Store string
DataGetString()Retrieve string
DataRemoveItem()Remove data entry
DataClearData()Clear all data
AnalyticsLogEvent()Log analytics event
AdsRequestRewardedAd()Show rewarded ad
AdsRequestInterstitialAd()Show interstitial ad
PurchasingPurchase()Make purchase
PurchasingGetAllPurchasableItems()Get available items
PurchasingGetPurchasedItems()Get owned items

Support

Need help? Our support team is here for you:

Last updated on