• 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
Question by chrisholdem · Dec 11, 2015 at 03:07 PM · standalonesqlitedllnotfoundexceptioneditor-launch-fail

Why does my DLL only throw a DllNotFoundException in the Editor?

I'm using sqlite3, both x86 and x86_x64. Unity version is 5.3.0f4.

The dlls are in Assets/Plugins/x86 and Assets/Plugins/x86_64 as they should be, but regardless of what I do the Editor doesn't seem to recognize the DLL. I get the DllNotFound Exception whenever my code attempts to .Open the db stored in a file.

When I build the project, however, everything runs fine and the correct version of the DLL is used.

I've checked to make sure they are marked native and checked x86/x86_x64 as appropriate. Both DLLs do actually exist in the file system as well.

I have attempted reopening my C# project, reimporting assets, and setting mono.data.sqlite (in the plugins folder) import settings for standalone to x86 and x86_x64 with no luck.

I've found answers to the opposite of this question, but no answers in those were able to apply to my situation.

Comment

People who like this

0 Show 1
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 shdes161 · Dec 12, 2015 at 10:54 PM 0
Share

When you re imported your assets, did you re import ALL assets or only certain ones?

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Riderfan · Dec 13, 2015 at 01:40 AM

Make sure your DLL is using .Net Framework 2.0 or lower. Otherwise Unity will throw an exception.

Comment

People who like this

0 Show 0 · 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

Answer by chrisholdem · Dec 14, 2015 at 09:41 PM

After being stumped for days, a solution was found.

Noting first that re-importing any set of assets did not work. The best solution was to take the files completely out of the project, and import them fresh.

So far as I can tell there appears to be an issue with the .meta files between 5.2 and 5.3, as this only occurred after updating and the only major difference between my files now and before fixing appears to be with the .meta files.

Comment
DanTheColoradan
Abdul_M

People who like this

2 Show 1 · 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 DanTheColoradan · Jun 05, 2017 at 08:50 PM 0
Share

I was sharing my unity project with my Mac and a virtual instance of Windows 10. When the virtual instance opened the project, it messed something up. I deleted an asset (in my case SpaceNavigator) and the error stopped.

avatar image

Answer by mgstauff · Mar 30, 2020 at 07:18 PM

There are some different answers here: https://stackoverflow.com/questions/10003028/dllnotfoundexception-in-unity3d-plugin-for-c-dll

What worked for me - for running from Editor, you need a copy of the dll in the project top folder (ie next to the Assets folder). For a build, you need to manually copy the dll to the build top level folder after the build, even though it does get put properly in the Plugins folder in the build.

And for IL2CPP builds and managed code, you may need a link.xml file to prevent stripping: https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html

Comment
MikeNewall

People who like this

1 Show 0 · 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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

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

Related Questions

Why I can not run Unity 2017.1.1 f 1 with the Command line in macOS? 0 Answers

How do you load System.Drawing.dll and gdiplus.dll on Unity Mac? 9 Answers

Do I need Unity Android Pro to find sqlite3.dll 0 Answers

How to include gdiplus.dll to a build? 1 Answer

how can I remote sqlite from android to pc/standalone after build? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges