Publication of the UPM package in the Unity Asset Store

Publication of the UPM package in the Unity Asset Store

πŸ“˜ Native Unity solution

In 2018, Unity developers released a centralized repository for iterative engine updates and Editor extensions, which was named UPM – Unity Package Manager.

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

You can highlight separately NuGetForUnity, which runs the NuGet client inside the Unity editor.

Despite this, more than 93 thousand assets and extensions are published in the Asset Storewhich does not officially provide the functionality of downloading UPM packages.

🎯 We are looking for a solution

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

Looking at the source assets of Asset Store Tools, we see experimental functionality wrapped in a directive #if UNITY_ASTOOLS_EXPERIMENTAL:

The functionality is already implemented by Unity, but is not available to end publishers:

At the same time, Unity Technologies developers download their own assets in the form of UPM packages:

UPM Asset Store Tools package structure

To achieve a similar result, we perform the following steps:

  1. We create a draft asset through the Unity Publisher Portal:

    If the draft was created successfully, the change will be reflected in the Uploader window

  2. Add to define Unity of the project
    Project Settings > Scripting Define Symbols:

  3. After the compilation is complete, select the option to download the local UPM package and specify the path to the package with the source codes:

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

    Unity mod does not reject UPM packages and successfully uploads them to its servers

πŸ’» Conclusion

The UPM package download type is suitable for assets or tools that are versioned and configure dependencies between packages.

Thereby obtaining the same structure of assets for the UPM registry and the Asset Store of the repository.

It is likely that Unity will publish an open source solution for publishers in future releases.
If you also used internal or experimental features, be sure to write about it.

🎁 Useful links

Smart Importer – GitHub, Asset Store
Asset Store Tools – GitHub, Asset Store
Unity’s Package Manager

Related posts