Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Pour recevoir le Firebase Dynamic Links que vous avez créé, vous devez inclure le SDK Dynamic Links dans votre application et enregistrer un écouteur pour gérer l'événement DynamicLinkReceived.
Le SDK Unity fonctionne à la fois pour Android et iOS, mais une configuration supplémentaire est requise pour chaque plate-forme.
Enregistrez votre projet Unity et configurez-le pour utiliser Firebase.
Si votre projet Unity utilise déjà Firebase, il est déjà enregistré et configuré pour Firebase.
Si vous n'avez pas de projet Unity, vous pouvez télécharger un exemple d'application.
Ajoutez le SDK UnityFirebase (plus précisément FirebaseDynamicLinks.unitypackage) à votre projet Unity.
Notez que l'ajout de Firebase à votre projet Unity implique des tâches à la fois dans la console Firebase et dans votre projet Unity ouvert (par exemple, vous téléchargez des fichiers de configuration Firebase depuis la console, puis vous les déplacez dans votre projet Unity).
S'inscrire pour recevoir les Dynamic Links
Pour vérifier si vous avez gagné un Dynamic Links, vous devez vous inscrire à l'événement DynamicLinkReceived.
voidStart(){DynamicLinks.DynamicLinkReceived+=OnDynamicLink;}// Display the dynamic link received by the application.voidOnDynamicLink(objectsender,EventArgsargs){vardynamicLinkEventArgs=argsasReceivedDynamicLinkEventArgs;Debug.LogFormat("Received dynamic link {0}",dynamicLinkEventArgs.ReceivedDynamicLink.Url.OriginalString);}
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[],[],null,["\u003cbr /\u003e\n\n| **Note:** Firebase Dynamic Links is *deprecated* and should not be used in new projects. The service will be shutting down soon. Follow the [migration guide](/support/dynamic-links-faq#how_should_i_migrate_from_the_service) and see the [Dynamic Links Deprecation FAQ](/support/dynamic-links-faq) for more information.\n\nTo receive the Firebase Dynamic Links that [you created](/docs/dynamic-links/create-links),\nyou must include the Dynamic Links SDK in your app and register a listener to handle the\n[`DynamicLinkReceived`](/docs/reference/unity/class/firebase/dynamic-links/dynamic-links#dynamiclinkreceived)\nevent.\n\nThe Unity SDK works for both Android and iOS, with some additional setup required\nfor each platform.\n\nBefore you begin\n\nBefore you can use\n[Firebase Dynamic Links](/docs/reference/unity/namespace/firebase/dynamic-links),\nyou need to:\n\n- Register your Unity project and configure it to use Firebase.\n\n - If your Unity project already uses Firebase, then it's already\n registered and configured for Firebase.\n\n - If you don't have a Unity project, you can download a\n [sample app](//github.com/google/mechahamster).\n\n- Add the [Firebase Unity SDK](/download/unity) (specifically, `FirebaseDynamicLinks.unitypackage`) to\n your Unity project.\n\n| **Find detailed instructions for these initial\n| setup tasks in\n| [Add Firebase to your Unity project](/docs/unity/setup#prerequisites).**\n\nNote that adding Firebase to your Unity project involves tasks both in the\n[Firebase console](//console.firebase.google.com/) and in your open Unity project\n(for example, you download Firebase config files from the console, then move\nthem into your Unity project).\n\nRegister to receive incoming Dynamic Links\n\nTo check for Dynamic Links, you need to register for the\n[`DynamicLinkReceived`](/docs/reference/unity/class/firebase/dynamic-links/dynamic-links#dynamiclinkreceived)\nevent. \n\n```c#\nvoid Start() {\n DynamicLinks.DynamicLinkReceived += OnDynamicLink;\n}\n\n// Display the dynamic link received by the application.\nvoid OnDynamicLink(object sender, EventArgs args) {\n var dynamicLinkEventArgs = args as ReceivedDynamicLinkEventArgs;\n Debug.LogFormat(\"Received dynamic link {0}\",\n dynamicLinkEventArgs.ReceivedDynamicLink.Url.OriginalString);\n}\n```"]]