Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Meta app Deeplink

Discussion in 'VR' started by michaelsimeoni001, Apr 2, 2023.

  1. michaelsimeoni001

    michaelsimeoni001

    Joined:
    Apr 6, 2022
    Posts:
    3
    Hello all!

    This is bugging me big time. I have been using this script across multiple projects and it works just fine. Sadly it's not working in the new project I am working on and I have compared all my setting from this new project to a previous project. I am very used to configuring project more or less the same but I had to check to be sure. I'm using the XR Toolkit, Oculus SDK and that is about it. All is functioning quite well except for this Deeplink. When I collide with the GameObject (door) Real Fishing VR should launch as it and other apps do with no issues in my other projects. What I have in this one scene (an apartment) is a simply UI to toggle images on a picture frame and another for music selection and that's it with the exception of a couch, table and chairs. O, and the door that should launch the app but instead of launching the app I'm exited to the Meta Homeroom instead. Any suggestion?

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Oculus.Platform;

    public class DeepLink : MonoBehaviour
    {
    // The ID of the app to launch
    public string APP_ID = "2582932495064035";

    private bool collided = false;

    private void OnTriggerEnter(Collider other)
    {
    if (!collided)
    {
    // Set the deeplink message option
    ApplicationOptions options = new ApplicationOptions();
    options.SetDeeplinkMessage("abc");

    // Convert the APP_ID to ulong and launch the other app
    ulong appId = ulong.Parse(APP_ID);
    Oculus.Platform.Application.LaunchOtherApp(appId, options);

    collided = true;
    }
    }
    }
     
  2. michaelsimeoni001

    michaelsimeoni001

    Joined:
    Apr 6, 2022
    Posts:
    3
    Who knows, must have been a two day bug lol. I made no changes and it's working now after loading it for the 3rd time today doing updates (adding assets), less then an hour from my original post. I seriously don't know but feel free to copy the code of course if it's useful to you.
     
  3. michaelsimeoni001

    michaelsimeoni001

    Joined:
    Apr 6, 2022
    Posts:
    3
    Welp, not working again, only in one project is it working just fine.