Authentication
The MultiSet Unity SDK provides flexible authentication options to integrate with your AR applications. Authentication is required to access MultiSet services and can be configured either at design-time or runtime.
Authentication Methods
Default Authentication (Design-time)
By default, the SDK handles authentication automatically at the start of an AR session using credentials configured in the Unity Editor.
Setup Steps:
- Open the MultiSet SDK Manager in Unity 
- Click on MultiSet Configuration 
- Enter your Client ID and Client Secret in the MultiSet Config file 
- The SDK will automatically authenticate when the AR session starts 
Advantages:
- No code required 
- Credentials are stored in the project configuration 
- Authentication happens automatically 
Runtime Authentication
For more control over the authentication process, you can pass credentials at runtime and manually trigger authentication.
Select MultiSet SDK Manager and click on Runtime Authentication

Implementation:
Once you check Runtime Authentication,  you must call AuthenticateMultiSetSDK() manually when needed
public void AuthenticateSDK()
{
    // Set credentials at runtime
    multisetSdkManager.clientId = clientId;
    multisetSdkManager.clientSecret = clientSecret;
    // Validate credentials before authentication
    if (clientId != null && clientSecret != null)
    {
        // Manually trigger authentication
        multisetSdkManager.AuthenticateMultiSetSDK();
    }
    else
    {
        Debug.LogWarning("Client ID and Client Secret cannot be empty! Please enter valid credentials.");
    }
}Advantages:
- Credentials can be loaded from external sources 
- Authentication timing is fully controlled 
- No automatic authentication at AR session start 
- Useful for multi-environment deployments 
Last updated
Was this helpful?