NormandErwan / ArucoUnity

Bring augmented reality to Unity by tracking Aruco markers in real time.
https://normanderwan.github.io/ArucoUnity/
BSD 3-Clause "New" or "Revised" License
204 stars 38 forks source link

Build on Android & Surface? #19

Closed xudi1227 closed 6 years ago

xudi1227 commented 6 years ago

Anyone tried to build the samples on tablets or phones? I tried exe on windows Surface and apk on Android, but they both failed to activate the camera. My xml file paths should be correct, so there must be some other reasons.

Any help would be appreciated.

Cheers, Johnny

NormandErwan commented 6 years ago

Hello and thanks your question!

Only Windows x64 is actually supported. ArucoUnity uses OpenCV via a C# to C++ bindings. They are compiled in a C++ plugin. So each platform needs to have a compatible compiled version of the plugin.

I don't have the time to try other platforms than Windows x64 but eventually I will try to build the plugin for most of them like Android or UWP (I think Surface runs UWP apps?).

If you want to try to compile the ArucoUnity plugin for a specific platform, you need first to compile OpenCV: see https://opencv.org/platforms/android/, UWP seems more complicated... Then the plugin: see https://normanderwan.github.io/ArucoUnity/manual/build-from-sources.html for the procedure to adapt for the platform. It seems feasible for Android: https://developer.android.com/studio/projects/add-native-code.

Erwan

NormandErwan commented 6 years ago

I close this issue has its similar to #6