MultisetSdkManager
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
The MultisetSdkManager class is a crucial component of the MultiSet SDK, responsible for handling authentication and managing the SDK's configuration within your Unity project. This document outlines the public properties and methods available for you to interact with the SDK.
The MultisetSdkManager is a singleton class that persists throughout your application's lifecycle. It automatically initializes and authenticates with the MultiSet backend using the credentials you provide. It also handles the display of a watermark based on your subscription plan.
This section details the publicly accessible fields of the MultisetSdkManager.
Property
Type
Description
version
const string
A constant string that represents the current version of the MultiSet SDK. Its value is hardcoded as "1.7.0".
clientId
string
The client ID used for API key authentication. This value is essential for the SDK to identify your application with the MultiSet backend.
clientSecret
string
The client secret used for API key authentication. This value is used in conjunction with the clientId to securely authenticate your application.
runtimeAuthentication
bool
A boolean flag that determines the authentication flow. If set to true, you will need to manually update the clientId and clientSecret and then call the AuthenticateMultiSetSDK() method to initiate authentication. If false, the SDK will attempt to authenticate automatically on startup using credentials from the MultiSetConfig resource.
Instance
static MultisetSdkManager
The static singleton instance of the MultisetSdkManager. This allows you to easily access the manager from any script in your project using MultisetSdkManager.Instance.
This section describes the publicly accessible methods of the MultisetSdkManager.
AuthenticateMultiSetSDK()
This method manually triggers the authentication process with the MultiSet backend.
Declaration
public void AuthenticateMultiSetSDK()
Description When you call this function, the SDK uses the current clientId and clientSecret to attempt to authenticate. This is particularly useful when runtimeAuthentication is enabled, allowing you to provide credentials at a time of your choosing.
Upon calling this method, it first checks for a valid internet connection. If a connection is available, it proceeds with the authentication request. If the credentials are not valid or are missing, an error will be logged to the console, and a toast message will be displayed.