For a simple example, I enhanced the UnityARPlayer code to select the highest video resolution available on the phone. To solve that I propose to set the video resolution to a fixed value that suits you best. Additionally, for a great game I can imagine that you do not want to bother the user with selecting a video resolution. Sadly, due to the lack of the system menu button in the modern phones and the full-screen/immersive mode of the Unity games, that is hidden. Video resolutionĪs for the video resolution, you would need to access the preference activity which comes with the ARPlayer. More detailed information about building the UnityARPlayer can be found here. (You might want to take a copy for safety ? )
Then you need to open the section for UnityARPlayer/Tasks/other/jarRelease.
Unity3d artoolkit tutorial android#
On the right of the Android Studio window there is a little Gradle-tab.You may need to fix the Build Tools version depending on what version you have installed.Select Open an existing Android Studio project.Clone the repository into an empty directory.To build the ARPlayer we need to follow these steps: So all we need to do is to clone the ARUnity5 Git repository and build the source code from there. Lucky again it was already merged to the master branch as well.
Luckily the autofocus feature has already been implemented into the plugin and is available on GitHub. So I’m going to show you how you can fix that very quick. Also, the default video resolution when you run your game is 320×240 which leads to a very bad user experience like jittering (shaking) of the 3D model you want to put on the ARMarker. Unfortunately, that release is a bit old and does not contain such features like autofocus on Android. If you are creating a game with ARToolKit on Unity you most likely use the Unity 3D plugin from the website.