Package versions in Unity follow the Semantic Versioning convention. By using Semantic Versioning, you can communicate the scope of changes to your users whenever you alter assets, assemblies, APIs, or other elements that affect package compatibility.
Note: This page uses the following terminology:
.asmdef files) in a project that reference your package’s assemblies.The Semantic Versioning convention uses the major.minor.patch format:
major: Incrementing this element represents a breaking change. Changes that remove or hide something are typically considered breaking changes.minor: Incrementing this element represents backward-compatible additions or changes.patch: Incrementing this element represents bug fixes only.
Start new packages at version 0.1.0 while APIs are unstable. The major version number 0 indicates that packages are in the initial development phase. During this phase, package APIs change often, frequently in a breaking manner. Keep the major version number at 0 until you consider your package stable enough and ready for use in production.
When the package is ready for production, release version 1.0.0, then:
1.2.3 and 2.0.0 aren’t compatible and can’t be used interchangeably without risk.0.1.3.0 to fulfill a dependency on 1.2.0, because 1.3.0 is backward-compatible. However, you can’t use 1.2.0 to fulfill a dependency on 1.3.0.0.1.3.0 and 1.3.1 are interchangeable because they have the same API, even though 1.3.1 contains a bug fix not present in 1.3.0.Unity’s Package Manager relies on these versioning rules to resolve dependencies and select compatible package versions automatically.
When you have decided which version number to increment, you can use either of the following methods to set the version number:
version property in the package manifest file.For more information, refer to Edit the package manifest.
The following table summarizes the Semantic Versioning rules for incrementing parts of a version number. Later sections describe these changes in detail.
| Area | Change type or context | Minimum version to increment |
|---|---|---|
| Assets | • Remove an asset visible to the Asset Database. • Change an asset’s GUID. |
Major |
| Assets | • Add assets or content that introduce new features. | Minor |
| Assets | • Adjust existing assets or content without changing their GUID. | Patch |
| Assemblies | • Remove or rename an assembly. • Move public APIs between assemblies. |
Major |
| Assemblies | • Remove platform support. • Add a define constraint. • Toggle the Auto Referenced setting (refer to Automatic referencing.) |
Major |
| Assemblies | • Add an assembly. • Add platforms. • Remove a define constraint. |
Minor |
| Assemblies | • Change assembly references. | Patch |
| Assemblies | • Toggle Allow ‘unsafe’ Code or Override References. | Refer to patch changes in assemblies |
| Package manifest | • Rename the package (name property). |
Not supported |
| Package manifest | • Add or remove or change a dependency (internal only, no API exposure or behavior change). | Patch |
| Package manifest | • Dependency introduces a new behavior or exposes new types through your API. | Minor |
| Package manifest | • Dependency change alters behavior or API in a way that’s not backward compatible. | Major |
| Package manifest | • Increase the value in the unity or unityRelease property. |
Minor or major |
| Scripting | • Rename or remove public types, methods, properties, fields, or events. • Change signatures (parameter types or count or order), return types, or member visibility (public to internal or private). • Rename namespaces or move public types or namespaces between assemblies. • Change enumeration (enum) values or underlying types. • Remove enumeration (enum) members. • Change public field or property types used in Unity serialization (including fields shown in the Inspector window.) • Remove or rename serialized members. |
Major |
| Scripting | • Add new public types, members, or events. • Add overloads or optional parameters to existing methods. |
Minor |
| Scripting | • Internal or private refactors. • Performance improvements. • Bug fixes that don’t change the public API surface. • Documentation, comments, or formatting. |
Patch |
| Policy | • Mark APIs as obsolete. | Minor |
| Policy | • Remove obsolete APIs. | Major |
For more information about these rules, refer to the relevant details sections for assetsAny media or data that can be used in your game or project. An asset may come from a file created outside of Unity, such as a 3D Model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary, assemblies, package manifestEach package has a manifest, which provides information about the package to the Package Manager. The manifest contains information such as the name of the package, its version, a description for users, dependencies on other packages (if any), and other details. More info
See in Glossary, and policies.
The Asset Database tracks assets by referencing the GUID in the assets’ .meta files.
The following breaking changes require an increment of the major version:
The following non-breaking changes require an increment of the minor version:
The following non-breaking changes require an increment of the patch version:
Assembly definitions (.asmdef) define a group of scripts that the Unity Editor’s compilation pipeline uses to produce managed assemblies (.dll files). The following guidance also applies to precompiled assemblies.
The Auto Referenced property in the Assembly Definition Inspector window controls whether Unity implicitly references an assembly. You can also control this behavior using the autoReferenced property in the assembly definition file (.asmdef) for your package.
Increment the major or minor version, depending on the scenario:
Avoid bundling third‑party dynamic link library (DLL) files in unrelated packages, which can create unexpected implicit references.
Increment the major version when you make the following breaking changes to an assembly:
includePlatforms or excludePlatforms properties).defineConstraints property in Assembly Definition file format reference.Increment the minor version when you make non-breaking changes to an assembly. Treat the following changes as non-breaking changes only when you add or change the assembly while the auto referenced property is disabled:
.asmdef file with new scripts).includePlatforms or excludePlatforms properties).defineConstraints property in Assembly Definition file format reference.Note: If you make these assembly changes while the auto referenced property is enabled, then the changes become breaking changes. In such cases, you must increment the major version instead of the minor version.
Increment the patch version when you make the following non-breaking changes to an assembly:
.asmdef).allowUnsafeCode or overrideReferences property).These changes don’t alter the public API surface for consumers.
The package manifest (package.json) defines a package’s identity, dependencies, and metadata.
Changing the name property isn’t supported. Publish the package as a new package with a different name.
Depending on the change, updating dependencies might require incrementing different parts of the version number.
| Change | Change type or context | Minimum version |
|---|---|---|
| Add a dependency | • Changes to internal API only. • Changes with no API exposure and no changes to behavior. |
• Patch (Auto Referenced disabled) • Major (Auto Referenced enabled) |
| Add a dependency | • Changes that introduce new behavior. • Changes that expose new types in your API. |
• Minor (Auto Referenced disabled) • Major (Auto Referenced enabled) |
| Add a dependency | • Changes that alter existing behavior in a way that’s not backward-compatible. • Changes to existing APIs. |
Major |
| Remove a dependency | • Changes to internal API only without changing behavior. | Patch |
| Remove a dependency | • Changes that break behavior • Removing APIs that expose their types. |
Major |
| Change a dependency version | • Changes to internal API only without changing behavior. | • Patch (Auto Referenced disabled) • Major (Auto Referenced enabled) |
| Change a dependency version | • Changes that introduce new behavior. • Changes that expose new types in your API. |
• Minor (Auto Referenced disabled) • Major (Auto Referenced enabled) |
| Change a dependency version | • Changes that alter behavior or API that aren’t backward-compatible. | Major |
You can change the description, category, keywords, and displayName properties in any release. Consider incrementing the minor version if the changes accompany new features.
Changing the unity or unityRelease properties requires at least minor increments because these changes alter supported Unity Editor versions. Increasing the Unity version excludes a package version from working on previous Unity editors and might break a dependent project or package. Decreasing the Unity version makes the package available to older Unity editors.
Policy changes include deprecation and removal of packages.
When you remove functionality from your package: