SDK / UNITY
Deep linking for Unity apps.
Resolve a URL delivered to your Unity app through the SDK coroutine API, then route with its destination or JSON payload.
01 / Install
Add the SDK
https://github.com/hellowilderlinks-cmyk/wilderlinks-sdks.git?path=/unity02 / Configure
Initialize once
Use the WilderLinks API base URL and add the exact link host configured for your app. Replace links.example.com with that host.
using Wilderbots.Wilderlinks;
public static class WilderlinksBootstrap
{
public static void Configure()
{
WilderlinksClient.Init(new WilderlinksConfig(
baseUrl: "https://api.wilderlinks.space",
domains: new[] { "links.example.com" }
));
}
}03 / Resolve
Handle an incoming link
The SDK returns a match result; your application remains responsible for navigating to the right screen.
using System.Collections;
using UnityEngine;
using Wilderbots.Wilderlinks;
public sealed class DeepLinkReceiver : MonoBehaviour
{
public void HandleUrl(string url)
{
StartCoroutine(WilderlinksClient.HandleIncomingUrl(url, result =>
{
if (!result.matched) return;
Debug.Log(result.destinationUrl);
Debug.Log(result.deepLinkPayloadJson);
}));
}
}Fields returned by the primary link handler
matchedopenIdtitledestinationUrldeepLinkPayloadJsoninstallAttributionProvidererror04 / Deferred matching
Match only tokens your app can access
using UnityEngine;
using Wilderbots.Wilderlinks;
public sealed class DeferredInstallCheck : MonoBehaviour
{
public void CheckClipboardFallback()
{
StartCoroutine(WilderlinksClient.CheckDeferredInstall(result =>
{
if (result.matched)
{
Debug.Log(result.deepLinkPayloadJson);
}
}));
}
}- CheckDeferredInstall(...) reads a clipboard fallback token.
- Unity C# does not include a Play Install Referrer bridge. For Android production installs, add an app-side native bridge, read dl_match_token, then call MatchDeferredToken(baseUrl, token, callback).
- MatchInstallAttributionToken(...) exchanges a token supplied by your own attribution flow; it does not acquire an iOS App Store token.
05 / Platform setup
Before testing on a device
- Add the package in Unity Package Manager using the UPM Git URL shown above. The package identifier is com.wilderbots.wilderlinks.
- The client resolves only URLs delivered to your app. Configure iOS Universal Links and Android App Links in the native app and associate the hosts with your app.
- Pass the configured smart-link host in WilderlinksConfig.domains. The sample host is a placeholder; replace it with your workspace domain.
06 / Security
Keep private credentials server-side
Do not ship organization or private API keys in mobile apps, browser JavaScript, or Unity client builds. Client-side link resolution and authenticated link-management operations have different trust boundaries; keep API-key operations in a trusted server environment.
To create a link in response to an action in your Unity app, send the link details to an endpoint in your own backend using your app’s normal user authentication. That backend must verify the user is allowed to create the link, then call WilderLinks (for example, POST /api/v1/links) with the organization API key held only on the server.
- Your app sends the requested destination and link settings to your backend.
- Your backend authenticates and authorizes the user, then creates the WilderLinks link.
- Your backend returns the generated URL; the app shares or displays it using its platform-appropriate UI.
The Unity SDK’s link-creation and event methods require the organization API key. Do not configure that secret in a publicly distributed game build.
These SDKs do not provide your app’s authenticated link-creation backend endpoint; implement that endpoint in your own backend.
07 / Troubleshooting
When a link does not match
- Init(...) must run before HandleIncomingUrl(...); the client requires its static config.
- Check that the URL host is listed in domains and that native app-link association delivers the URL to Unity.
- The callback receives a result with matched and error; deepLinkPayloadJson is a JSON string, not a parsed C# object.
Continue building