简体   繁体   English

Unity import package 没有导入正确的版本

[英]Unity import package is not importing correct version

I'm trying to import Mirror package ( https://assetstore.unity.com/packages/tools.network/mirror-129321 ) but it doesn't seems to import latest version.我正在尝试导入Mirror package ( https://assetstore.unity.com/packages/tools.network/mirror-129321 ) 但它似乎没有导入最新版本。

The version specified in Package manager is "30.2.2": Package 管理器中指定的版本是“30.2.2”: 在此处输入图像描述

But what I have in the version.txt of is "11.4.2":但是我在version.txt中拥有的是“11.4.2”: 在此处输入图像描述

I already tried to delete and reimport the folder.我已经尝试删除并重新导入该文件夹。 I also tried a Reimport but without success.我也尝试了Reimport但没有成功。

Is their some sort of cache?他们是某种缓存吗?

Thank you.谢谢你。

I just tried getting it from the package manager and I got the right version (30.2.2).我刚刚尝试从 package 经理那里得到它,我得到了正确的版本 (30.2.2)。 Note that the version.txt file is just a text file and mine shows 30.2.1 even though I got 30.2.2.请注意,version.txt 文件只是一个文本文件,我的显示为 30.2.1,即使我得到的是 30.2.2。

All the packages are cached under the "Library" folder.所有包都缓存在“库”文件夹下。 You can try closing Unity, deleting the Library folder and opening your project again.您可以尝试关闭 Unity,删除 Library 文件夹并再次打开您的项目。 Unity will re-download all the packages at that point. Unity 将在此时重新下载所有包。

To remove the package from your project you can either:要从您的项目中删除 package,您可以:

  1. Find the package in package manager window within Unity and press the "remove" button.在Unity中的package manager window中找到package,点击“remove”按钮。 Unity should instantly remove the package from the cache folder instantly. Unity 应立即从缓存文件夹中立即删除 package。

  2. Remove it from the Packages/manifest.json file.从 Packages/manifest.json 文件中删除它。 Close Unity first if going this route.如果走这条路,请先关闭 Unity。 Unity will sync the cache with the manifest.json the next time you open the project.下次打开项目时,Unity 会将缓存与 manifest.json 同步。

I fixed it by removing directly in local Asset Store directory and redownload it from the online Asset Store.我通过直接在本地 Asset Store 目录中删除并从在线 Asset Store 重新下载来修复它。

  1. Go to C:\Users\<YourUser>\AppData\Roaming\Unity\Asset Store-5.x\ and delete the package you want to redownload. Go 到C:\Users\<YourUser>\AppData\Roaming\Unity\Asset Store-5.x\并删除您要重新下载的 package。

  2. Once the package is deleted, go in https://assetstore.unity.com/account/assets and click the blue button "Open in Unity".一旦package被删除,go在https://assetstore.unity.com/account/assets点击蓝色按钮“Open in Unity”。 Once open in Unity, click the "download" button.在 Unity 中打开后,单击“下载”按钮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM