Version: 2019.2
包冲突
覆盖 Unity 的冲突解决方式

自动解决冲突

Package Manager 在计算包依赖关系时,如果发现对同一个包的多个版本的请求,则 Package Manager 将自动选择依赖关系层级离根部最近的包。如果依赖关系层级相同,则 Package Manager 在依赖关系层级相同的版本中选择最高版本。然后在 Unity 控制台中显示冲突描述。

Package Manager 会选择包 X 的 v2.0.0,因为这个包离根部更近
Package Manager 会选择包 X 的 v2.0.0,因为这个包离根部更近

In this example, the higher version (2.0.1) of Package X appears as a dependency three levels away from the Project (via Package B and Package C). The Package Manager loads version 2.0.0 of Package X because its dependency is two levels away from the Project (via only Package A).

NOTE: Even if the Package Manager can resolve which package to load, Unity still displays a conflict report in the console if Unity requests different major versions of the same package, such as 1.0.0 and 2.0.0.

包冲突
覆盖 Unity 的冲突解决方式