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 Rockafella · Aug 05, 2015 at 10:33 AM · androidplugindllnative

Native c++ plugin on android

Hello Everyone, I have problem with using Native c++ on Android device. It's simply showing dllnotfoundexception when debugging with ADB. I try every combination of .dll path (Plugins, Plugins/Android, Root Folder, Library Folder etc) I try different compiling options Net.2.0 and subset. It's working perfect on Windows and Editor. Library is not being load in project, i am using standard command dllimport and it shows error message. It looks like Library it's not being compiled into project. I export this to Google Android Project and compile there, but it's still the same. Library is not .net and i don't have access to edit source code i was trying to decompile but its not being read by .net reflector etc. Is it still possible somehow to use this file with Android device, like asset or something.

Comment
Add comment · Show 4
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 meat5000 ♦ · Aug 05, 2015 at 10:13 AM 0
Share

https://developer.android.com/tools/sdk/ndk/index.html

 @dllimport?

http://docs.unity3d.com/$$anonymous$$anual/NativePlugins.html

avatar image Rockafella · Aug 05, 2015 at 10:16 AM 0
Share

Yes in Unity there is function [DllImport("PluginName")] I already read that: "A very simple native library with a single function might have source code that looks like this:

 float FooPluginFunction () { return 5.0F; } "

I cannot edit source code of native library i cannot even read source code. [DllImport ("PluginName")] give me always dllnotfoundexception.

avatar image meat5000 ♦ · Aug 05, 2015 at 11:01 AM 0
Share

Here's another manual page (Beats me why they aren't all together in the manual):

http://docs.unity3d.com/$$anonymous$$anual/PluginsForAndroid.html

And one guy was simply using the wrong files.

Have you trawled Google on this? Would be useful to know what you have actually tried.

Oh yes, and theres this


Native Plugins in the Editor

32-bit native plugins will not work in the 64-bit editor. Attempting to load them will result in errors being logged to the console and exceptions being thrown when trying to call a function from the native plugin.

To continue to use 32-bit native plugins in the editor, use the 32-bit editor version (provided as a separate installer).

Not sure this is causing the issue on build?


avatar image Rockafella · Aug 05, 2015 at 12:59 PM 0
Share

Well it's 32 bit and its working in editor. Editor and PC it's not a case :) Building a Plugin for Android it's not a case as well. I need to use already created library in Android(I don't have source code, i cannot read and edit with any decompiler). I know what methods i need to call from this library but it's working only on Windows build and in Editor. This guides will be related if this libraries can be opened or edited. btw. i google this before posting here but thx for try anyway :) I am just thinking that compiler is not compiling this .dll

0 Replies

· Add your reply
  • Sort: 

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

How to get android sample plugin to compile 1 Answer

using shared libraries generated by Android project in Unity 0 Answers

Different approaches to Android plugins 0 Answers

Can I build Unity Android and iOS plugins as DLLs? as in compile all the .jars, .mm and the .cs together as 1 DLL? 0 Answers

How to access an Android native plugin in unity ? 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