13 private AndroidJavaObject currentActivity;
14 private AndroidJavaClass maxstARClass;
18 if (currentActivity == null || maxstARClass == null)
20 AndroidJavaClass javaUnityPlayer =
new AndroidJavaClass(
"com.unity3d.player.UnityPlayer");
21 currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>(
"currentActivity");
22 if (currentActivity != null)
24 maxstARClass =
new AndroidJavaClass(
"com.maxst.ar.MaxstARInitializer");
25 maxstARClass.CallStatic(
"init", currentActivity, appKey);
37 Debug.Log(
"No Activity");
44 if (currentActivity != null && maxstARClass != null)
46 maxstARClass.CallStatic(
"deinit");
47 currentActivity.Dispose();
48 currentActivity = null;
50 maxstARClass.Dispose();