unity3d :类型“任务"存在于 Unity.Tasks 和 mscorelib 中 [英] unity3d : The type "task" exist in both Unity.Tasks and mscorelib

查看:29
本文介绍了unity3d :类型“任务"存在于 Unity.Tasks 和 mscorelib 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用unity 2019.1.4f1创建了一个空白项目.我从 此处 导入了用于身份验证的 firebase SDK 包和另一个 google 登录包.我基本上是在尝试使用 firebase 在 android 中实现谷歌登录.但是当我导入第二个包(谷歌登录)时,我收到这个错误(如下)

I created a blank project with unity 2019.1.4f1. I imported the firebase SDK package for authentication and another google sign in package from here. I am basically trying to achieve google signin in android with firebase. But when I import the 2nd package ( google sign in), I get this error (below)

我在项目中没有做任何其他事情,只是导入.我不知道该怎么办.

I haven't done anything else in the project, just imported. I have no idea what to do.

LibraryPackageCachecom.unity.textmeshpro@2.0.1ScriptsEditorTMP_PackageUtilities.cs(310,17):错误 CS0433:任务"类型存在于Unity.Tasks"中,版本=0.0.0.0,文化=中性,PublicKeyToken=null'和'mscorlib,版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089'

LibraryPackageCachecom.unity.textmeshpro@2.0.1ScriptsEditorTMP_PackageUtilities.cs(310,17): error CS0433: The type 'Task' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

推荐答案

我遇到了同样的问题并修复了它.看起来此版本的 TextMeshPro 引用了您项目中的所有库.您可以通过更改缓存的包文件来更改它.更准确地说,您可以添加这一行

I had the same issue and fixed it. Looks like this version of TextMeshPro references all of the libraries in your project. You can change that by changing the cached package files. More precisely, you can add this line

overrideReferences":真,

"(您的项目目录)LibraryPackageCachecom.unity.textmeshpro@2.0.1ScriptsEditor
Unity.TextMeshPro.Editor.asmdef"

"(Your Project Directory)LibraryPackageCachecom.unity.textmeshpro@2.0.1ScriptsEditor
Unity.TextMeshPro.Editor.asmdef"

在文本编辑器中打开它(确保您具有写入文件的访问权限).

by opening it in a text editor (make sure you have access rights to write to the file).

这将使 TextMesh Pro 编辑器代码仅引用此文件中的程序集,与项目中所有已编译的程序集相对.该文件将如下所示:

That will make the TextMesh Pro Editor code reference only the assemblies in this file opposite to all of the compiled assemblies in the project. the file will look like this:

    {
        "name": "Unity.TextMeshPro.Editor",
        "references": [
            "Unity.TextMeshPro",
            "Unity.ugui",
            "Unity.ugui.Editor"
        ],
        "optionalUnityReferences": [],
        "overrideReferences": true,
        "includePlatforms": [
            "Editor"
        ],
        "excludePlatforms": []
    }

第二个选项是删除TextMesh Pro Package.如果您确定项目没有使用它,您可以使用顶部菜单窗口->"包管理器".然后在 Packages 窗口中,在列表中选择 TextMesh Pro 并单击删除".

The second option is to remove the TextMesh Pro Package. If you are sure that the project does not use it, you can use the top menu "Window -> Package Manager". Then in the Packages window, in the list select TextMesh Pro and click "Remove".

这篇关于unity3d :类型“任务"存在于 Unity.Tasks 和 mscorelib 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆