Unity SDK - Configuration Reference
Every configuration option the Singular SDK for Unity exposes, with its type, default, supported platforms and how to set it.
Most options are fields on the SingularSDK component, so they appear in the Unity Inspector on the Singular SDK GameObject. A few are static members — they do not appear in the Inspector and can only be set in code before initialization. Each entry below says which it is.
Setting configuration in code
Clear Initialize On Awake in the Inspector, set the fields you need, then initialize the SDK yourself. Static members can only be set this way.
using UnityEngine;
using Singular;
public class SingularBootstrap : MonoBehaviour
{
void Awake()
{
// Clear Initialize On Awake in the Inspector first, so the SDK
// does not start before these values are set.
SingularSDK singular = GetComponent<SingularSDK>();
singular.SingularAPIKey = "YOUR_SDK_KEY";
singular.SingularAPISecret = "YOUR_SDK_SECRET";
singular.sessionTimeoutSec = 120;
// Static members are not shown in the Inspector and are set here only.
SingularSDK.endSessionOnGoingToBackground = true;
SingularSDK.InitializeSingularSDK();
}
}
Complete Configuration Example
Comprehensive SDK Configuration
A representative configuration covering the options most integrations use.
using UnityEngine;
using Singular;
public class SingularBootstrap : MonoBehaviour
{
void Awake()
{
SingularSDK singular = GetComponent<SingularSDK>();
// Required
singular.SingularAPIKey = "YOUR_SDK_KEY";
singular.SingularAPISecret = "YOUR_SDK_SECRET";
// Logging — off for a production build
singular.enableLogging = false;
// Sessions and link resolution
singular.sessionTimeoutSec = 120;
singular.shortlinkResolveTimeout = 15;
singular.ddlTimeoutSec = 120; // Android
// Links
singular.brandedDomains = new string[] { "go.yourcompany.com" };
singular.pushNotificationsLinkPaths = new string[] { "sng_link" };
// iOS
singular.waitForTrackingAuthorizationWithTimeoutInterval = 300;
singular.SKANEnabled = true;
// Android
singular.facebookAppId = "1234567890";
SingularSDK.InitializeSingularSDK();
}
}
autoIAPComplete
SingularSDK.autoIAPComplete Property
Legacy switch for automatic StoreKit transaction completion.
Deprecated feature: this field is marked [Obsolete] in the SDK and should not be used in new integrations. Complete transactions through Unity IAP and report them with SingularSDK.InAppPurchase().
Signature
public bool autoIAPComplete
Default: false
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.autoIAPComplete = false;
brandedDomains
SingularSDK.brandedDomains Property
Custom link domains that the SDK should treat as Singular Links. Add every branded domain you use for tracking links; without this, only the sng.link domains registered on the Manage Links page are recognized.
Signature
public string[] brandedDomains
Default: null
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.brandedDomains = new string[] {
"yourcompany.com",
"go.yourcompany.com"
};
clipboardAttribution
SingularSDK.clipboardAttribution Property
Lets the SDK read the pasteboard on launch to recover attribution data from a Singular Link.
Reading the pasteboard shows the system paste notification to the user on iOS 14 and later. Enable it only if you understand that trade-off.
Signature
public bool clipboardAttribution
Default: false
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.clipboardAttribution = true;
collectOAID
SingularSDK.collectOAID Property
Collects the OAID, an advertising identifier used on Android devices without Google Play Services — mainly in mainland China. Requires the OAID library in your build.
Signature
public bool collectOAID
Default: false
Platform: Android only
Set via: Unity Inspector or code
Usage Example
singular.collectOAID = true;
CustomSdid
SingularSDK.CustomSdid Property
Supplies your own Singular Device ID instead of letting the SDK generate one. Set it before initialization and register a handler with SingularSDK.SetSingularSdidAccessorHandler() to be told when it has been accepted.
Enterprise feature: custom SDID is not enabled by default. Do not set it unless your account has been enabled for it — contact your Singular representative first.
Signature
public static string CustomSdid
Default: null
Platform: iOS and Android
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.CustomSdid = "your-own-device-id";
ddlTimeoutSec
SingularSDK.ddlTimeoutSec Property
How long after a fresh install the SDK will still resolve a deferred deep link and call your Singular Link handler. Leave it at 0 to use the 60 second default.
Signature
public long ddlTimeoutSec
Default: 0 (uses the 60 second default)
Platform: Android only
Set via: Unity Inspector or code
Usage Example
singular.ddlTimeoutSec = 120;
enableDeferredDeepLinks
SingularSDK.enableDeferredDeepLinks Property
Registers the deferred deep link handler on Android. Leave it enabled unless you deliberately want to ignore deferred links.
Signature
public static bool enableDeferredDeepLinks
Default: true
Platform: Android only
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.enableDeferredDeepLinks = false;
enableLogging
SingularSDK.enableLogging Property
Enables SDK log output, which helps during integration and troubleshooting. This is enabled by default (enableLogging is true), so clear the checkbox before shipping a production build.
Signature
public bool enableLogging
Default: true
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.enableLogging = false;
enableODMWithTimeoutInterval
SingularSDK.enableODMWithTimeoutInterval Property
Enables Google's On-Device Measurement (ODM) and sets how many seconds the SDK waits for Google's attribution token before sending the first session. Required for Google Ads iOS Integrated Conversion Measurement (ICM).
This delays the first session. The SDK blocks until Google returns a token or the interval elapses, so deep link callbacks are deferred by up to that many seconds. ODM also needs Google's ODM SDK, the -ObjC linker flag, and Unity SDK v5.5.0 or later.
Signature
public int enableODMWithTimeoutInterval
Default: -1 (disabled)
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.enableODMWithTimeoutInterval = 10;
endSessionOnGoingToBackground
SingularSDK.endSessionOnGoingToBackground Property
Ends the Singular session as soon as the app is backgrounded, instead of letting it expire after the session timeout. Most apps should leave this off and rely on sessionTimeoutSec.
Signature
public static bool endSessionOnGoingToBackground
Default: false
Platform: iOS and Android
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.endSessionOnGoingToBackground = true;
facebookAppId
SingularSDK.facebookAppId Property
Your Facebook App ID, needed for Meta install referrer attribution on Android.
Signature
public string facebookAppId
Default: null
Platform: Android only
Set via: Unity Inspector or code
Usage Example
singular.facebookAppId = "1234567890";
fcmDeviceToken
SingularSDK.fcmDeviceToken Property
The Firebase Cloud Messaging token used for uninstall tracking. Prefer SingularSDK.RegisterTokenForUninstall(), which sets this before initialization and calls through to the native SDK afterwards.
Signature
public static string fcmDeviceToken
Default: null
Platform: Android only
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.RegisterTokenForUninstall(token);
Initialized
SingularSDK.Initialized Property
Read-only. Reports whether the SDK has finished initializing. Most SDK methods return without doing anything until this is true.
Signature
public static bool { get; } Initialized
Default: false
Platform: iOS and Android
Set via: Code only — not shown in the Inspector
Usage Example
if (SingularSDK.Initialized) {
SingularSDK.Event("level_complete");
}
InitializeOnAwake
SingularSDK.InitializeOnAwake Property
Initializes the SDK automatically in the GameObject's Awake(). Clear it when you need to set configuration in code first, then call SingularSDK.InitializeSingularSDK() yourself.
Signature
public bool InitializeOnAwake
Default: true
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.InitializeOnAwake = false;
limitAdvertisingIdentifiers
SingularSDK.limitAdvertisingIdentifiers Property
Stops the SDK from collecting device advertising identifiers. Use it for mixed-audience apps that must not collect an advertising ID from some users.
Signature
public bool limitAdvertisingIdentifiers
Default: false
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.limitAdvertisingIdentifiers = true;
logLevel
SingularSDK.logLevel Property
Sets how verbose the SDK log output is. The values are the Android android.util.Log constants, where a lower number is more verbose: 2 Verbose, 3 Debug, 4 Info, 5 Warn, 6 Error, 7 Assert. The default is 3 (Debug). Any value outside 2–7 is rejected and the SDK falls back to Debug, so 0 and 1 do not reduce logging — clear Enable Logging to turn it off.
Signature
public int logLevel
Default: 3 (Debug)
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.logLevel = 3; // Debug
manualSKANConversionManagement
SingularSDK.manualSKANConversionManagement Property
Hands SKAdNetwork conversion values over to your app. When enabled, Singular stops managing them and you must call SingularSDK.SkanUpdateConversionValue() yourself.
Manual updates are ignored while this is off. If conversion values are not arriving, check this setting first.
Signature
public bool manualSKANConversionManagement
Default: false
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.manualSKANConversionManagement = true;
openUri
SingularSDK.openUri Property
The URI the app was opened with, handed to the SDK at initialization so it can attribute the open. Set it before initialization when your activity receives a deep link before the SDK starts.
Signature
public static string openUri
Default: null
Platform: Android only
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.openUri = "myapp://product/123";
pushNotificationsLinkPaths
SingularSDK.pushNotificationsLinkPaths Property
Where to find the Singular Link inside your push notification payloads. Each entry is a path through the payload, with levels separated by /. Add one entry per payload shape your app receives.
Signature
public string[] pushNotificationsLinkPaths
Default: null
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.pushNotificationsLinkPaths = new string[] {
"sng_link",
"notification/deep_link",
"rootObj/nestedObj/singularLink"
};
restartSessionOnReturningToForeground
SingularSDK.restartSessionOnReturningToForeground Property
Starts a new Singular session every time the app returns to the foreground. Pair it with endSessionOnGoingToBackground; most apps should leave both off.
Signature
public static bool restartSessionOnReturningToForeground
Default: false
Platform: iOS and Android
Set via: Code only — not shown in the Inspector
Usage Example
SingularSDK.restartSessionOnReturningToForeground = true;
sessionTimeoutSec
SingularSDK.sessionTimeoutSec Property
How long the app can stay in the background before the next open counts as a new session. Leave it at 0 to use the 60 second default.
Signature
public long sessionTimeoutSec
Default: 0 (uses the 60 second default)
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.sessionTimeoutSec = 120;
shortlinkResolveTimeout
SingularSDK.shortlinkResolveTimeout Property
How long the SDK waits for a short link to resolve before giving up. Leave it at 0 to use the 10 second default.
Signature
public long shortlinkResolveTimeout
Default: 0 (uses the 10 second default)
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.shortlinkResolveTimeout = 15;
SingularAPIKey
SingularSDK.SingularAPIKey Property
Your SDK Key. Find it in Singular under Developer Tools > SDK Integration > SDK Keys.
Do not use your Singular Reporting API Key here. Only the SDK Key from the SDK Integration page will work; anything else silently prevents data from reaching Singular.
Signature
public string SingularAPIKey
Default: Required
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.SingularAPIKey = "YOUR_SDK_KEY";
SingularAPISecret
SingularSDK.SingularAPISecret Property
Your SDK Secret, issued alongside the SDK Key on the same page.
Signature
public string SingularAPISecret
Default: Required
Platform: iOS and Android
Set via: Unity Inspector or code
Usage Example
singular.SingularAPISecret = "YOUR_SDK_SECRET";
SKANEnabled
SingularSDK.SKANEnabled Property
Registers the app for SKAdNetwork attribution and lets Singular manage conversion values. Leave it on unless another SDK in your app owns SKAdNetwork.
Signature
public bool SKANEnabled
Default: true
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.SKANEnabled = false;
waitForTrackingAuthorizationWithTimeoutInterval
SingularSDK.waitForTrackingAuthorizationWithTimeoutInterval Property
How many seconds the SDK waits for the user to answer the App Tracking Transparency prompt before sending the first session. Waiting lets the first session carry the IDFA when consent is granted.
The IDFA can only be attached to the first session. If the session is sent before the user answers the prompt, that install has no IDFA permanently. Singular recommends 300 seconds when your app shows the ATT prompt.
Signature
public int waitForTrackingAuthorizationWithTimeoutInterval
Default: 0 (do not wait)
Platform: iOS only
Set via: Unity Inspector or code
Usage Example
singular.waitForTrackingAuthorizationWithTimeoutInterval = 300;