Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by sfernandez · Oct 19, 2015 at 11:45 PM · androidil2cppnative plugin

Native plugin JNI_OnLoad/UnitySetGraphicsDevice not called when using IL2CPP on Android

I'm one of the developers of NoesisGUI and we are having trouble making our asset work with IL2CPP under Android.

NoesisGUI asset uses a native plugin that is placed under Assets/Plugins/Android. When used normally (Mono2x) the library is loaded correctly and both JNI_OnLoad and UnitySetGraphicsDevice (for low-level native rendering) are called:

D dalvikvm: Trying to load lib /mnt/asec/com.noesis.test/lib/libNoesis.so
> D dalvikvm: Added shared lib /mnt/asec/com.noesis.test/lib/libNoesis.so
> JNI_OnLoad found and called
> UnitySetGraphicsDevice found and called with the correct DeviceType

When using IL2CPP, our library does not seem to load (no message is logged about it) and JNI_OnLoad and UnitySetGraphicsDevice are not being called. However, PInvoke funtions to our library are working.

We also noticed that a new library is being loaded when IL2CPP is activated:

D dalvikvm: Trying to load lib /mnt/asec/com.noesis.test/lib/libil2cpp.so
> D dalvikvm: Added shared lib /mnt/asec/com.noesis.test/lib/libil2cpp.so
> D dalvikvm: No JNI_OnLoad found in /mnt/asec/com.noesis.test/lib/libil2cpp.so, skipping init

Any idea if that is a known bug of IL2CPP under Android? Are native plugins (using low-level rendering api) supported in IL2CPP?

Thanks for your help.

Comment
Add comment · Show 5
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 JoshPeterson · Oct 20, 2015 at 11:42 AM 0
Share

This is not a known bug for IL2CPP with Android. Native plugins are supported though. Could you submit a bug report and let me know the bug number? We will have a look at correcting this.

Also, the libil2cpp.so library is the IL2CPP runtime library, so loading it is expected and correct.

avatar image sfernandez · Oct 20, 2015 at 03:26 PM 0
Share

Bug report number: 737959.

As explained in the bug report, I was able to reproduce this problem also with Unity RenderingPlugin example (version 4.5: http://docs.unity3d.com/es/current/uploads/Examples/RenderingPluginExample45.zip).

avatar image JoshPeterson sfernandez · Oct 20, 2015 at 03:43 PM 0
Share

Excellent, thanks for the bug report. We will investigate it.

avatar image jdesantos JoshPeterson · Dec 12, 2015 at 12:44 AM 0
Share

Anything new about this?

Show more comments

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

6 People are following this question.

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

Related Questions

Unity 2019.3.5f1 Android Build (IL2CPP) crash Log 0 Answers

App not opening/working after publishing on Google Play Store 4 Answers

Android > App user settings> il2cpp > crash the app on original install 0 Answers

Unity5.4.0p4 compile error for android by il2cpp 1 Answer

When I am trying to read data from a CSV file using StreamReader(C#) with unity, I am facing Invalid Id 0x00000000. error 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