Table of Contents

Namespace Titipi.MocaLib

Classes

AdjustModule

Wraps the Adjust SDK for attribution tracking, event reporting, ad revenue, and purchase validation.

AdjustModuleConfig
AppLovinModule

Wraps AppLovin MAX for App Open, Banner, Interstitial, and Rewarded ad formats. Manages multiple ad units per format, sorted by eCPM, with automatic reload on failure. Not supported on WebGL.

AppLovinModuleConfig
AppLovinPlatformConfig
AppsFlyerModule

Wraps the AppsFlyer Unity SDK for install attribution, event tracking, ad revenue, and purchase validation.

AppsFlyerModuleConfig
ByteBrewModule

Wraps the ByteBrew SDK for custom event tracking and in-app purchase reporting.

CommonModule

Handles platform-level setup that must run before any third-party SDKs are initialized. Always available — no define guard required.

FIAMPopupUI

MonoBehaviour that renders Firebase In-App Messaging popups. Must be in its own file named FIAMPopupUI.cs so Unity can discover it via Add Component. Instantiated at runtime from the Resources/FIAMPopupUI.prefab by FirebaseInAppMessagingModule.

FacebookModule

Wraps the Facebook Unity SDK. Initializes the SDK and activates the app session so Facebook can attribute installs and track app events.

FirebaseInAppMessagingModule

Receives Firebase In-App Messaging campaigns via a native Android AAR plugin and dispatches them to game-side handlers. Image campaigns are also downloaded to local storage and cleaned up when their duration expires.

FirebaseModule

Wraps the Firebase Unity SDK, providing Analytics, Crashlytics, Remote Config, and Cloud Messaging. Not supported on WebGL — all methods return early with a warning when compiled for that platform.

FirebaseModuleConfig
GameAnalyticsModule

Wraps the GameAnalytics SDK for design events and resource economy tracking.

IAPModule

Wraps Unity IAP v5 for product registration, purchase flow, receipt validation, and restore. Uses the event-driven StoreController API. Supports an optional server-side validation step via IIapPurchaseVerificator.

IAPModuleConfig
IapVerificationError

Standardized error codes returned by the purchase verification flow.

LeaderboardEntry

Represents a single player entry in a leaderboard.

LeaderboardModule

Firebase Firestore-backed leaderboard with per-player score submission, top-N queries, and rank calculation via server-side aggregate counts. Firestore path: leaderboards/{leaderboardName}/scores/{userId}. Requires FirebaseModule to be initialized first.

NetworkModule

Provides internet connectivity checking and background polling. Exposes a one-shot CheckInternetConnectionAvailable() for on-demand checks, and a polling loop that fires OnInternetStatusChanged when reachability changes. The polling loop automatically pauses when the app is backgrounded.

PlayerProfile

Firestore document representing a player, stored at users/{userId}. Automatically populated with device and app metadata on first save.

PlayerProfileModule

Manages the current player's Firestore profile. Signs in anonymously on first run, caches the UID in PlayerPrefs for subsequent sessions, and stores/loads the profile document. Requires FirebaseModule to be initialized first.

RatingModule

Displays a store rating prompt. The prompt is shown at most once per install — the shown state is persisted in PlayerPrefs.

RatingModuleConfig
ServerTimeModule

Fetches the current UTC time from the Titipi server API and exposes it as UtcNow. Resynchronizes every 10 minutes; uses a cached value from PlayerPrefs on cold starts so the time is available immediately without waiting for the first network round-trip.

Structs

AdImpressionData
FIAMBannerMessage

A lightweight banner message delivered via Firebase In-App Messaging custom data.

FIAMButton

Represents a tappable button in a FIAM popup, including its label, action, and optional metadata.

FIAMImageMessage

An image-based in-app message with campaign metadata and action buttons.

FIAMMetadata

Campaign-level metadata included with image and banner messages.

FIAMModalMessage

A text-based in-app message with a title, body, and up to two action buttons.

Interfaces

IFIAMPopupHandler

Implement this interface to handle button taps from FIAM popups. Pass the implementation to RegisterPopupHandler(IFIAMPopupHandler).

IIapPurchaseVerificator

Implement this interface to plug in a custom server-side receipt validator. Set the implementation via SetPurchaseVerificator(IIapPurchaseVerificator).

Enums

FIAMButtonActionType

The action to perform when a FIAM popup button is tapped.