コード例 #1
0
    void OnMouseDown()
    {
        StringBuilder builder = new StringBuilder();

        builder.AppendLine("AR Toolkit Version " + PluginFunctions.arwGetARToolKitVersion());
        builder.AppendLine("Running?: " + PluginFunctions.arwIsRunning());

        int    width;
        int    height;
        int    pixelSize;
        string pixelFormatString;

        PluginFunctions.arwGetVideoParams(out width, out height, out pixelSize, out pixelFormatString);
        builder.AppendLine("VideoParams: w:" + width + " h:" + height + " pixelSize:" + pixelSize + " formatStr:" + pixelFormatString);

        builder.AppendLine("Current ErrCode: " + PluginFunctions.arwGetError());


        using (AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.google.unity.UnityTangoARPlayer"))
        {
            JLog(cls_UnityPlayer.ToString());
            cls_UnityPlayer.CallStatic("foo");
//			using (AndroidJavaObject obj_Activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
//			{
//				obj_Activity .CallStatic("foo");
//			}
        }
        builder.AppendLine("I Called UnityTangoARPlayer.foo()");

        debugAndToast(builder.ToString());
    }