unice
unice

Reputation: 2842

How to remove small camera preview box in artoolkit?

I'm using unity3d and ARToolkit to create an AR app. My question is when opening the application, a small camera preview box always shows in the upper left of the screen. Is there a way to remove this by editing UnityARPlayer.jar via android studio or the unity package itself?

Upvotes: 0

Views: 431

Answers (1)

GuruJeya
GuruJeya

Reputation: 141

To solve this issue (just to hide the small camera, not to remove it completely!), you have to regenerate the UnityARPlayer.jar file after making a small correction in the UnityARPlayerActivity.java file available in the AndroidStudio project of ARToolkit 5.3.2 which is available here.

In the project, in the UnityARPlayer\src\main\java\org\artoolkit\ar\unity\UnityARPlayerActivity.java file, in the onResume() method, change the code

decorView.addView(previewView, new LayoutParams(128, 128));

to

decorView.addView(previewView, new LayoutParams(1, 1));

Here, we are just changing the camera preview size, to make it nearly invisible.

Upvotes: 0

Related Questions