- Home /
ARtoolkit problem on android
Hi guys, I'm having troubles at running ARtoolkit (one Augmented Reality framework) on android. Seems like after releasing of unity 5.2 issues related to the shader/material used to the video panel made it impossible to work, but I fixed it after using the following shader instead:
Shader "VideoPlaneNoLight"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" { }
}
SubShader
{
Pass
{
Material
{
Diffuse [_Color]
}
Lighting Off
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
SeparateSpecular Off
SetTexture [_MainTex]
{
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
I've also had some problems building on android, but after creating the right plugin I've finally made it work. Problem is the phone shows no video and only a black screen (even tough the menu works). I don't know if it's a problem related to the camera or the material I used, someone with more experience could help me out?
Hi @sonic220,
i am using ARToolkit 5.3.1 and unity 5.2.1f1 and i do already have that Shader. What is difference you brought to that file ?
also, i do have a issue. I can't seem to compile for Android. once the compilation done, the app installs correctly, and crash at start, saying, unfortunately, the app had to stop.
Any clue on solving this issue? does it come from the shader ?
Richard
Answer by DocYesh · Nov 28, 2016 at 08:03 AM
Whenever I build for Android, I get this error, Null reference exception :( Any help please. Best, Yesh.
NullReferenceException: Object reference not set to an instance of an object ARTrackedObjectGizmo.DrawMultiMarker (.ARMarker m, Matrix4x4 mat, Boolean selected) (at Assets/ARToolKit5-Unity/Scripts/Editor/ARTrackedObjectGizmo.cs:117) ARTrackedObjectGizmo.DrawMarker (.ARTrackedObject to, Boolean selected) (at Assets/ARToolKit5-Unity/Scripts/Editor/ARTrackedObjectGizmo.cs:86) ARTrackedObjectGizmo.RenderARTrackedObjectGizmo (.ARTrackedObject to, GizmoType gizmoType) (at Assets/ARToolKit5-Unity/Scripts/Editor/ARTrackedObjectGizmo.cs:60) UnityEditor.DockArea:OnGUI()
Answer by ritchy · Nov 18, 2015 at 02:30 PM
more detail, and a possible anwser this time. At least a solution that worked for me.
I just ugraded to Unity 5.2.2f1 and the same project that crashed my ARToolKit app now work.
Good luck. Rich