Search Unity

Native Plugins

Discussion in 'Package Manager' started by FrancisDuranceau, Jul 18, 2018.

  1. FrancisDuranceau

    FrancisDuranceau

    Joined:
    Aug 13, 2012
    Posts:
    10
    Hello,

    What about being able to create packages for native plugins?
    For instance, if I get ARKit from GitHub and simply wrap it into a package.

    When I import, no problems, no warning.

    Nevertheless, when I then build, I get errors like:
    D:/Workspace/ARKit/Packages/com.unity.arkit@1.5.0/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs(5,19): error CS0234: The type or namespace name `iOS' does not exist in the namespace `UnityEditor'. Are you missing an assembly reference?

    Is it known? Workaround? Planned to be supported?

    Obviously, copying and pasting into my project instead than using it as a package works. I can build.

    Cheers
    Francis
     
  2. FrancisDuranceau

    FrancisDuranceau

    Joined:
    Aug 13, 2012
    Posts:
    10
    Using 2018.2.0f2.
     
  3. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @FrancisDuranceau,

    Scripts within a package from the package manager are not scoped into the
    UnityEditor
    namespace. So you may have to hack your package furthermore to make it work. i.e. fix the namespace reference. Note that you may face other problems. Please let me know if you achieve something that works :)

    Converting native plugins to packages is something that we plan to do in the future.

    Regards,

    Pascal