Example #1
0
    //[SerializeField]
    //private GameObject PopupMenu;

    // Use this for initialization
    void Start()
    {
        //Debug.Log(Application.temporaryCachePath);
        //Debug.Log("NFTWidth : " + arMarker.NFTWidth);

#if UNITY_ANDROID && !UNITY_EDITOR
        tessdataDir = Application.persistentDataPath + "/tessdata";
        Debug.Log("File : " + tessdataDir + tessdataFileName);
        Debug.Log("Check : " + !Directory.Exists(tessdataDir) + " : " + !File.Exists(tessdataDir + "/" + tessdataFileName));
        if (!File.Exists(tessdataDir + "/" + tessdataFileName))
        {
            Debug.Log("data not Exists : " + tessdataDir + tessdataFileName);
            StartCoroutine(LoadData());
        }
        else
        {
            Debug.Log("data Exists");
            InitApi();
        }
#endif

        arCameraNumber = arCamera.GetComponent <Camera>();

        //Debug.Log(CheckMarkerFromString("001-O01-0001"));
    }
        private void RemoveVuforiaScript(ARCamera go)
        {
            VuforiaTrackablesTracker node = go.GetComponent <VuforiaTrackablesTracker> ();

            if (node != null)
            {
                DestroyImmediate(node);
            }
        }
        private void AddVuforiaScript(ARCamera go)
        {
            VuforiaTrackablesTracker node = go.GetComponent <VuforiaTrackablesTracker> ();

            if (node == null)
            {
                go.gameObject.AddComponent <VuforiaTrackablesTracker> ();
            }
        }
Example #4
0
    /// <summary>
    /// 因为投影矩阵相同,只需要设置三个相机的位置一致就可以保持三个画面观看的位置和角度一致
    /// </summary>
    private void OnEnable()
    {
        ARCamera.position = VRCamera.position = Camera2D.position;

        ScreenCamera3D temp3D;

        temp3D = ARCamera.GetComponent <ScreenCamera3D>();
        if (temp3D)
        {
            ARCamera.GetComponent <ScreenCamera3D>().enabled = true;
        }

        temp3D = VRCamera.GetComponent <ScreenCamera3D>();
        if (temp3D)
        {
            VRCamera.GetComponent <ScreenCamera3D>().enabled = true;
        }
    }
Example #5
0
 // Use this for initialization
 void Start()
 {
     arCameraNumber = arCamera.GetComponent <Camera>();
     LoadContent();
 }