Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • 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 ComicSeansMyomo · Jul 06, 2015 at 06:13 PM · editorwindowspluginsnative plugindependencies

Where does Unity5 look for native plugin dependencies in the editor on Windows?

I am running Unity5.1.1 on Windows. I have a native dll for a plugin I made, plugin.dll, but it depends on another native cpp dll dependency.dll, so when I try to use plugin.dll in Unity I get "missing dll exception" which is because of the missing dependency. In Unity4, I fixed this problem by placing plugin.dll in the appropriate plugins folder, and dependency.dll in the root folder of the project where the Assets folder is; however this solution does not work for me with the same plugin and dependency in a Unity5 project.

What does work however, is building the game and placing dependency.dll next to the game executable. So I just cannot get the dependency to be found by unity in the editor.

I also tried placing dependency.dll in the plugins folder besides plugin.dll, that also did not work.

I have both 32bit and 64bit versions of plugin.dll and dependency.dll appropriately placed in Assets/plugins/x86 and Assets/plugins/x86_64.

So, does anyone know where does Unity5 looks for native plugin dependencies in the editor on Windows?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Trigve · Jul 19, 2015 at 01:27 AM

From what I know (and from the testing) it looks like it first try to look in unity.exe origin path, then SysWOW64 (if you're on 64 bit), then System, then Windows, then in the project root dir. So placing the .dll in the project root dir should suffice. If you put the .dll to the unity.exe folder (unity install path), it should work in every case (for testing only). Also be aware, that if the dll with the same name exist in the System dir, it would be loaded first. You could use ProcessMonitor to monitor unity.exe and find which paths it checks when loading your dlls.

Comment
Add comment · Show 2 · 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 marrr048 · Sep 01, 2015 at 12:20 AM 0
Share

I'm currently having trouble with this. I'm running Unity 5.1.2f1, and the editor will crash unless I have my dependencies directly in the folder with the editor exe. It doesn't seem to ever pick up the dependencies if I put them anywhere in the project folder.

avatar image Trigve · Sep 01, 2015 at 06:58 AM 0
Share

Where exactly did you put the .DLL? Because it is working for me.

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Native Plugin Cleanup 0 Answers

Any project explorer addins? 0 Answers

Using Native Plugins in an Android Project and Executing in the Unity Editor 0 Answers

Handle sound inside native unity iOS plugin 0 Answers

Unity decreases sound quality of my Spotify 1 Answer


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