unity3d:类型为& quot;""在Unity.Tasks和mscorelib中都存在 [英] unity3d : The type "task" exist in both Unity.Tasks and mscorelib

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

问题描述

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

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.

Library \ PackageCache \ com.unity.textmeshpro@2.0.1 \ Scripts \ Editor \ TMP_PackageUtilities.cs(310,17):错误CS0433:两个"Unity.Tasks"中都存在任务"类型,版本= 0.0.0.0,文化=中性,PublicKeyToken =空'和'mscorlib,版本= 4.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089'

Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Editor\TMP_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":true,

"(您的项目目录)\ Library \ PackageCache \ com.unity.textmeshpro@2.0.1 \ Scripts \ Editor
Unity.TextMeshPro.Editor.asmdef"

"(Your Project Directory)\Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Editor
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软件包.如果您确定该项目未使用它,则可以使用顶部菜单窗口->".包管理器".然后在程序包"窗口的列表中,选择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:类型为& quot;""在Unity.Tasks和mscorelib中都存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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