Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

How to open Unity from URL

Discussion in 'Editor & General Support' started by gomgo_unity, Apr 26, 2021.

  1. gomgo_unity

    gomgo_unity

    Joined:
    Apr 9, 2020
    Posts:
    4
    Hi, i want to open my unity program with a URL, like for example, if you go to "vscode://" it opens Visual Studio Code, so i want to do that in Unity, you open "yourgame://" and open my unity game, if you can help me, thanks a lot, i wanting to do that for a long time, thx

    The second image says: Open Visual Studio Code? A website wants to open this program. Cancel. Open Visual Studio Code
     

    Attached Files:

  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    You need to register a protocol with the host OS. These differ depending on what platform you're on. Here's a tutorial for Windows, OSX, and Linux: https://support.shotgunsoftware.com...g-Applications-Using-Custom-Browser-Protocols

    You would want to install the protocol as part of the game installation process or on first run.

    You'll also want to provide the user with a method of uninstalling this feature if they don't want it anymore or uninstall the game.
     
    adamgolden and gomgo_unity like this.
  3. gomgo_unity

    gomgo_unity

    Joined:
    Apr 9, 2020
    Posts:
    4
    Thank You a Lot, i go to try it :D