Receive Dynamic Links with Unity  |  Firebase Dynamic Links (original) (raw)

To receive the Firebase Dynamic Links that you created, you must include the Dynamic Links SDK in your app and register a listener to handle theDynamicLinkReceivedevent.

The Unity SDK works for both Android and iOS, with some additional setup required for each platform.

Before you begin

Before you can useFirebase Dynamic Links, you need to:

Note that adding Firebase to your Unity project involves tasks both in theFirebase console and in your open Unity project (for example, you download Firebase config files from the console, then move them into your Unity project).

To check for Dynamic Links, you need to register for theDynamicLinkReceivedevent.

void Start() { DynamicLinks.DynamicLinkReceived += OnDynamicLink; }

// Display the dynamic link received by the application. void OnDynamicLink(object sender, EventArgs args) { var dynamicLinkEventArgs = args as ReceivedDynamicLinkEventArgs; Debug.LogFormat("Received dynamic link {0}", dynamicLinkEventArgs.ReceivedDynamicLink.Url.OriginalString); }