Package Profiles

Package Profiles is a Unity asset that allows developers to differentiate Unity package dependencies based on a project’s Build Profiles, and identify and resolve issues across different package sets.

Overview

Every Unity project since Unity 2018 now contains a single JSON file which records any dependencies that the Package Manager should track. If a dependency is missing, but present in the manifest.json file, then it will be downloaded and imported. If a dependency is present in the project but not in the manifest file, then it will be removed from the project.

This single file applies project-wide. If your project targets Windows and macOS, then you will be using the same versions of the same packages on both platforms. If you decide to add Android and iOS support, then they too will share the same packages, whether or not those packages contain relevant or compatible code. Package maintainers can use Assembly Definitions alongside Define Constraints and Version Defines to control whether the assemblies in a package are active on specific platforms, or to control which features are available based on the current Unity version or version of some other dependency. However, the project itself has no control over the configuration of packages and their assemblies; packages are ‘read-only’ unless imported directly into the project and maintained as part of your own codebase.

Package Profiles solves the one-size-fits-all problem by allowing developers to differentiate the package dependency list based on the active Build Profile.

If your Unity project needs separate package lists for different target platforms or Build Profiles, then Package Profiles can help by linking individual manifests to specific Build Profiles and integrating easily with your CI pipeline.