• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dyllandry · Mar 17, 2019 at 03:05 PM · dllpluginsgooglepackages

Integrating Google API: Assembly will not be loaded due to errors

I'd be grateful for any help on this issue. I don't think it is complicated, I just have a poor understanding of .NET.


I am trying to integrate a simple feedback system that submits data to a Google Sheet. I am have trouble specifically with adding Google's API dll file to Unity.


I used NuGet for Unity to download Google's Api. Because the API is compatible with .NET 4.5, I followed Microsoft's Using .NET 4.x in Unity guide. Here is what I've done so far.


  1. Change Unity's Scripting Runtime Version to .NET 4.x Equivalent

  2. Change Unity's Api Compatibility Level to .NET 4.x

  3. Placed the Google.Apis.dll into Assets/Plugins.


When I attempt to run the game I receive this error:

 Assembly 'Assets/Plugins/Google.Apis.dll' will not be loaded due to errors:
 Unable to resolve reference 'Google.Apis.Core'. Is the assembly missing or incompatible with the current platform?
 Unable to resolve reference 'Newtonsoft.Json'. Is the assembly missing or incompatible with the current platform?

Again, I would be grateful for any help. If you need more information let me know. I've also posted this question in the Unity forums.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by dyllandry · Mar 17, 2019 at 03:18 PM

I believe I found a solution. I thought, maybe they are missing, and maybe I can get them.

I found Netwonsoft.Json and Google.API.Core on NuGet. Downloading their packages, renaming them to zips, unzipping them, and copying their dll files in /lib/netstandard2.0/ to my Assets/Plugins folder resolved the errors. :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by trakevital · Jan 08 at 10:42 AM

For those who didn't understand @dyllandry's explenations: In File Explorer go to Assets > Packages > <name of package> rename the .nupkg file to .zip file and then unzip them. Double click on the zipped file go to the lib folder and take out the net45 folder. Take the folder and replace it with the netstandard2.0 or whatever folder is in the current lib folder. Do this for every google package and it should work when you run the unity project alt text


capture.png (19.2 kB)
capture.png (19.5 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

103 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I include added dll's to a android apk build? 1 Answer

XInputDotNetPure plugin: Namespace could not be found. 1 Answer

How can I use UnityEngine.UI in managed plugin? 1 Answer

Mono and missing types using external library 2 Answers

Error loading a 3.0 framework dll (WFC) 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges