artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
43 stars 22 forks source link

Black Screen with ARToolkitX on Android and Unity #14

Closed nickos64252 closed 5 years ago

nickos64252 commented 5 years ago

Hello everyone,

I try to use ARToolkitX on Unity with ARUnityX. I have Unity 2017.4.15f1 on Windows 10.

I downloaded the last version of ARUnityX (this git) and folowed the instructions to build it for windows and android. I ended copying some files from the Source folder to my Unity project. Here are the files I copied :

filesx

When I open SimpleScene and run it in Windows, it works fine. When I run it on ANdroid, the screen stays black, and in Android monitor, I can see :

"Ok - True .... Got Frame - False" It looks like writing it each frame, it makes me think the program tries to access camera but fails.

Here is my manifest (I changed the package name to "com.artoolkitx.testUnity" in Unity) :

manifest

Any ideas ?

Thank you

nickos64252 commented 5 years ago

After some research, I found an error when starting. I don't know if it is related. log

philip-lamb commented 5 years ago

@ThorstenBux This looks like the UnityPlayerActivity isn't an instance of ARUnityXPlayerActivity. Any ideas? Maybe the manifest needs to be edited?

nickos64252 commented 5 years ago

Hello, I think my manifest was wrong. The activity in application must be a "org.artoolkitx.arx.unity.ARUnityXPlayerActivity". I corrected my manifest to : manifest2

And now it looks like it cannot find this activity at all when the program starts. log2

But I may be wrong on all of that.

nickos64252 commented 5 years ago

I think it is due to problems in my plugins for android. Can someone send me the compiled plugins ? Thanks

nickos64252 commented 5 years ago

After some research, I found out the Unity Android plugin did not compile (with "./build.sh android") due to a problem in my JDK. I can now compile it. It generates "arunityXPlayer-release.aar". I wanted to use the packaging command, but there are Mac command (line56) in it. So I just copied the above file to my Plugin folder. I now have an image on Android, but the recognition doesn't work.

Error : "CameraEventListenerUnityImpl : cameraStarted::arwAndroidVideoPushInit() failed"

I think my manifest and plugin are ok, so I don't know what is the error.

nickos64252 commented 5 years ago

I don't what was going on, but after downloading the releases unity package (and some troubles), it works. Thank you