- Home /
Question by
Htss_samy · Jan 06, 2021 at 07:13 AM ·
script error
how to receive dynamic link event in unity
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);
}
when i use above code i got bellow error in unity console
error CS0103: The name 'DynamicLinks' does not exist in the current context
error CS0103: The name 'OnDynamicLink' does not exist in the current context
Comment
I think the main problem is the first error, where is DynamicLinks referenced from? Have you added the using directive to the correct namespace?