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):
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'
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,
to
"(Your Project Directory)\Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Editor\
Unity.TextMeshPro.Editor.asmdef"
by opening it in a text editor.
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": []
}
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".
The issue that you may be running into is a compatibility layer that brings .NET 4.x features into .NET 3.x runtime called Parse. In Firebase, this is why there are dotnet3 and dotnet4 folders.
When you do your plugin imports, assuming that you're using the .NET 4.x runtime (default in Unity 2019), make sure that you grab the unity packages from the dotnet4 folder from Firebase. Then, when you import the Google SSO package, exclude the Parse directory (the Firebase plugin should have pulled in the necessary parts already anyway). That should get you up and running!
Add a namespace to the declaration.
SomeNameSpace.Task task = new SomeNameSpace.Task();
e.g.
Unity.Tasks.Task task = new Unity.Tasks.Task();
Done.
Just update the textMeshPro from package manager.