Search Unity

URL Navigation

Discussion in 'Windows' started by Nicolas0304, Jul 21, 2020.

  1. Nicolas0304

    Nicolas0304

    Joined:
    Jun 10, 2020
    Posts:
    2
    Greetings,

    I would like to open my unity app by using an URL custom protocol. For example "myApp://"
    I bind my script "Launcher.cs" to my scene and configure Unity to accept this custom protocol.

    All of this works when my app is not already launch. I can get my url argument in my launcher script using
    Code (CSharp):
    1. string[] args = Environment.GetCommandLineArgs();
    But, when the app is already launch, I'm not going through my launcher script then I can't get the URL for my process. By calling the URL, the app returns to the foreground.

    How can I get the URL in my application code ? Do you have any ideas ?

    Unity version : 2018.3.6f1

    Regards,
    Nicolas