Deeplink – Set up deep links into the Unity editor

Unity Version Compatibility

What's this?

Unity uses deeplinks for a number of AssetStore-related tasks, e.g. "Open in Unity" on the Asset Store website. This is cool but there's no official callback to tap into this mechanism for custom behaviours.

This package adds a [Deeplink] attribute that can be set on a static method to have it called for specific deeplink requests.

It also adds support to 2019 & 2020 for the upmpackage installation deeplink that's available from 2021.2+:
com.unity3d.kharma:upmpackage/com.unity.memoryprofiler which means you can start using that in projects today.

The built-in upmpackage/ format just calls PackMan to add that package – so if it's from a scoped registry and you have that registry properly set up, it will just work.

Quick Start

This package is also available on OpenUPM.
Add this package to Unity:

  • Open Package Manager
  • Click +
  • Click Add Package from git URL / name
  • Paste https://github.com/needle-tools/unity-deeplink.git?path=/package
  • Press Enter.

Check out the sample as basis for custom stuff:

  • In Package Manager, select the new Deeplink package
  • Import the Samples
  • Double-click the DeeplinkSample-Website file to open in a browser
  • Click the various links to interact with Unity.

Test Links

Note: GitHub messes up some of these links. They work fine from a regular website. Use the ↗ links from there.

UPM package installation links will work when this package is in your project, or without the package when you're on 2021.2+.

  • Install MemoryProfiler Package

These will only work when this package is in your project and you've imported the Sample.

  • Open Sample Scene
  • Ping Receiver1
  • Ping Receiver2

For reference, these are regular Unity deeplinks:

  • Install Unity 2021.1.19f1
  • Open Bolt in "My Assets"
  • Install MemoryProfiler

Deeplinks from GitHub markdown / Slack / Discord / etc

Many non-browsers (messaging tools, markdown viewers, ...) don't support deeplinks directly.
You can use our deeplink forwarder for these cases:

The forwarder is located at https://fwd.needle.tools/deeplink? and supports links starting with com.unity3d.kharma: or unityhub://.

Related Issues

  • GitHub Markdown strips custom protocol links; forwarder links do work.
  • Deeplinks on Discord can be used directly by wrapping them in <>, e.g. <com.unity3d.kharma:upmpackage/com.unity.memoryprofiler>.
    Links look strange on mobile though; a bug is reported.
  • OpenUPM changes links to be relative when they use custom protocols: openupm/openupm#2393

Contact

needle — tools for unityDiscord Community@NeedleTools@marcel_wiessler@hybridherbst