Home The secret to publishing UPM package to the Asset Store
Post
Cancel

The secret to publishing UPM package to the Asset Store

πŸ“˜ Unity native solution

In 2018, Unity’s developers released a centralized repository for iterative updates to their Editor engine and extensions called UPM - Unity Package Manager.

Later, third-party services appeared through which UPM packages were distributed:

Separately, NuGetForUnity can be highlighted, which runs the NuGet client within the Unity editor.

Despite this, more than 93 thousand assets and extensions have been published on the Asset Store, but it does not officially offer UPM package downloading functionality.

🎯 Seeking a solution

Asset Store Tools v11.3.1, allows you to download assets from the following sources:

  • From Assets Folder
  • Pre-exported .unitypackage

Looking through the sources of the Asset Store Tools, we see the experimental functionality wrapped in the
#if UNITY_ASTOOLS_EXPERIMENTAL directive:

The functionality has already been on the Unity side, but it is not available to third-party developers:

Meanwhile, Unity Technologies developers load their own assets in the form of UPM packages:

To achieve a similar result, follow these steps:

  1. Create a draft package using the Unity Publisher Portal:

  2. Add the value UNITY_ASTOOLS_EXPERIMENTAL to Project Settings > Scripting Define Symbols:

  3. After compilation is complete, select the option to load the local UPM package and specify the package path:

  4. Click the Upload button and πŸŽ‰:

πŸ’» Conclusion

The type of download using UPM packages is suitable for assets or tools that have version control and configure dependencies between packages.

This results in a uniform asset structure for the Unity Package Registry and Asset Store.

In future Unity releases, it is likely that an open solution will be published for publishers.

🎁 Helpful Links

Guide

Smart Importer

Asset Store Tools

Unity’s Package Manager

This post is licensed under CC BY 4.0 by the author.