Search Unity

Unity DLL plugins for android

Discussion in 'Android' started by Arsyl_Games, May 17, 2020.

  1. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    I make my first android game with Unity and it uses something called "plugins". I have a script called Native for that. Everything works fine within the Unity editor. On top from my script it says "FOR UNITY_IOS" while I want to make my game for android. I have 2 plugins for the android platform. One is called "Armeabi V7" and the other "x86". I have also a plugin for iOS and two that are called "x86" and "x86_64". The problem Comes with the plugins when I build my game. I get 3 errors. One that the plugins "x86" and "x86_64" are the same. So I deleted"x86" than the second error is that there is a problem with the iOS plugin. So I deleted it because we don't use it (because build platform is android). The third error is that from the 2 android plugins ("Armeabi v7" and "x86") that they are the same. I make my game for 64 bit devices so I deleted the "x86". Than I could succesfully build my game without errors. I tested the apk file on more than 10 different phones and on all the phones it doesn't work. Can you help me or giving me information? Thanks
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    First of all it sounds like you didn't set plugin settings, you shouldn't be needing to delete them, just click on each plugin in Unity, and set for which platform and CPU architecture the specific plugin is for via Plugin Inspector

    Without the log from the device it's impossible to say what's wrong, if you're on Unity 2019.1 or higher, you can get logcat package via Package Manager to investigate the log from the app. Alternatively you can do adb logcat command yourself, check the documentation please - https://docs.unity3d.com/Manual/LogFiles.html


    Hope that helps
     
  3. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    All the plugins are set to "all platforms". Later I will specify it for android (in my case). I will also install Logcat like you did say. Is that also avaible on the asset store or Just the package manager?
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    So, yes, All Platforms is wrong setting.

    Android Logcat is available only in Package Manager, assuming you're using Unity 2019.x or higher
     
    Arsyl_Games likes this.
  5. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    Okay, I can download it later and see how it goes.
     
    gusal likes this.
  6. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    So I tested it to set the Build platform but I don't know what CPU I should choose. This is how my code looks and these are the plugins:
     

    Attached Files:

  7. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    I have a question. Does native plugins work in Unity free? Or is it Just Unity plus and Unity pro?
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    You mentioned that native plugins are named with x86, ARMv7 that's the CPU identifiers.


    Yes, native plugins work with Unity Free.
     
  9. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    Its weird, I did select everything and it still doesn't work. I can try everything again but if it doesn't work than I don't know what to do than. But how do I use the android plugin? If I want to delete Them all there is one I cant because that one is in use. But I want the Android plugin that needs to be used
     
    Last edited: May 19, 2020
  10. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    Try copy pasting the path of a plugin and the contents of its meta file (located next to a plugin) here
     
  11. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    How do you mean exactly the path? I only have the plugin and a few other files. I can show later some pictures about it. If you want to contact me in a different wat here is my Gmail: gamesarsyl@gmail.com
     
  12. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    I meant the relative plugin path in your project.
     
  13. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    this?
     

    Attached Files:

  14. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    I don't see the full path from this screenshot
     
  15. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    I don't really know what you mean with "relative full path"
     
  16. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    if you would put the dummy.so plugin in your root project path, the path would be 'Assets/dummy.so', in your case I assume it's something like 'Assets/Android/Plugins/x86/info.so' ?
     
  17. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    I ha
    I have 2 things. I cant open them for some reason. My pc says I dont have a program/app installed to open it. This is how it looks:
     

    Attached Files:

  18. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    If you're on Windows, hit Windows key and enter Command Prompt or cmd, navigate to your project location and do
    Code (CSharp):
    1. dir /B /S > filepaths.txt
    this will generate filepaths.txt, attach that file here
     
  19. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    All my Unity projects are in my OneDrive. It doesn't work than. So I Will remove Them and place Them somewhere else. Than try again and see if it works.
     
  20. Arsyl_Games

    Arsyl_Games

    Joined:
    May 8, 2019
    Posts:
    45
    Can you show some screenshots what I need to do? I dont really understand.
     
  21. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920
    Check this video, about cmd -