- Home /
How to use Google Apps Script with Unity and create a simple application that makes requests to the Google Apps Script Execution API
I followed the steps here and created a simple .NET console application that makes requests to the Google Apps Script Execution API. Worked as expected.
Now I'm trying to reproduce this in Unity but I'm stuck. I installed the Google.Apis.Script.v1 package in Visual Studio using the NuGet Package Manager Console and brought it to my Unity project. Unity complains that assemblies with the same identity have already been imported and that I should consider removing duplicated references. I get the same error for each duplicate. This is one of the 35 errors:
error CS1703: An assembly `System.Net.Http' with the same identity has already been imported. Consider removing one of the references
Assets/packages/System.Net.Http.4.3.1/lib/net46/System.Net.Http.dll (Location of the symbol related to previous error)
Assets/packages/System.Net.Http.4.3.1/runtimes/unix/lib/netstandard1.6/System.Net.Http.dll (Location of the symbol related to previous error)
Any ideas on how to proceed?
Is there a different Google.Apis.Script.v1 package for Unity?
I'm using Unity 2017.1.0f3 with Scripting Runtime Version set to Experimental (.NET 4.6 Equivalent) and Api Compatibility Level set to .NET 4.6.
Update: Although hesitant about it, I excluded the duplicates from the Unity project. Other errors appeared. I uploaded a conversation I had with a friend regarding the issue suggesting that maybe the threading biz is not supported in mono (click capture.png below to open):
Just a note (from the friend in the chat): can still be just an install prob too, if the DLLs are somehow not right, leading to that circular dependency error. Was just thinking of $$anonymous$$ono compatibility too as another possible source of error but no evidence of that so far, at least that System.Threading.CancellationToken seemed that might exist.