Search Unity

Adnroid plugins location

Discussion in 'Android' started by justtime, Aug 19, 2019.

  1. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! I have to use different cpu architectures for my plugin(.so). What is right way for placing them? When i store it in Assets/Plugins/Android/LibraryName/x86(or arm64), they are not included in build, only "Assets/Plugins/Android" path is working.
     
    Last edited: Aug 19, 2019
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    The hardcoded paths were deprecated long ago, unless you're using very old Unity version, you simply click on a plugin, and change appropriate plugin settings.
     
  3. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    I try to put my .so plugins in just Plugins/LibraryName folder, select Android, architecture, but they are not included in build.
    On start i got some kind of
    Code (CSharp):
    1.  Unable to find libraryname
    If i put it just in Plugins/Android it's working fine.
     
    Last edited: Aug 19, 2019
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    There are Android specific CPU settings as well, it's not enough to select Android as compatible platform, you also need to specify compatible CPU architecture for plugin
     
  5. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    I did it. Selected related to library compatible CPU architecture. Problem is that only libs from Assets/Plugins/Android include in builds. If i put them in Assets/Plugins/LibName they not include in build.
    Unity 2017.4.31f, both mono and il2cpp
     
    Last edited: Aug 20, 2019
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Sounds like a bug then, I do think we have tests that cover this scenario in 2018.x, not sure about 2017.4.31f.
     
  7. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    For my case 2018.2 shows the same result. I made 2 projects, please check them out, may be i've done something wrong?
    https://yadi.sk/d/fXswTG1kcx0hkw

    Also, i found if i firslty put plugins in Android they will be in build, then i move them into the Plugins/LibName, they are not in build, then back to the Plugins/Android, and they are still not in build, but in first time they was.

    Edit2: Also found, that sometimes it's working for Plugins/LibName folder(if i delete plugins, and copy/paste them again into that folder), but behavior is not constant.
     
    Last edited: Aug 20, 2019
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Please submit a bug via Unit's bug reporter and attach a repro project.

    Thank you