Ejemplo n.º 1
0
    //FLASH


    // Use this for initialization
    void Start()
    {
        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.RegisterVuforiaStartedCallback(OnVuforiaStarted);
        audioSource = GetComponent <AudioSource>();
        if (persistentDataPath == null)
        {
            persistentDataPath = Application.persistentDataPath;
        }
        Debug.Log("Data Path =  " + persistentDataPath);         // If you want to easily see where that is.

//		var vuforia = VuforiaARController.Instance;
//		vuforia.RegisterVuforiaStartedCallback(OnVuforiaStarted);
//		vuforia.RegisterOnPauseCallback(OnPaused);

        if (!PlayerPrefs.HasKey("firstLoad"))
        {
            instructionScreen.SetActive(true);
            PlayerPrefs.SetInt("firstLoad", 1);
        }
        else
        {
            mainMenu.SetActive(true);
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.RegisterVuforiaStartedCallback(OnVuforiaStarted);
        vuforia.RegisterOnPauseCallback(OnPaused);
    }
    void Start()
    {
        VuforiaARController VuAR = VuforiaARController.Instance;

        VuAR.RegisterVuforiaStartedCallback(OnVuStarted);
        VuAR.RegisterOnPauseCallback(OnVuPaused);
    }
        void Start()
        {
            VuforiaARController vuforiaARController = VuforiaARController.Instance;

            vuforiaARController.RegisterVuforiaInitializedCallback(OnInitializeVuforia);
            vuforiaARController.RegisterOnPauseCallback(OnPauseVuforia);
        }
Ejemplo n.º 5
0
    private void OnDestroy()
    {
        //Vuforia events, like all events, need to be unregistered if the objects are not destroyed at the same time to avoid the other object from keeping the other object alive forever. This is what happens without unregistering on object destroy or some other disposal method.
        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.UnregisterVuforiaStartedCallback(OnInitialized);
        vuforia.UnregisterTrackablesUpdatedCallback(OnTrackablesUpdated);
    }
Ejemplo n.º 6
0
    // Start is called before the first frame update
    void Start()
    {
        VuforiaARController vuforia = VuforiaARController.Instance;

        if (vuforia != null)
        {
            vuforia.RegisterVuforiaStartedCallback(InitCameraAutoFocus);
        }
    }
Ejemplo n.º 7
0
    // Start is called before the first frame update
    void Start()
    {
        mPixelFormat = PIXEL_FORMAT.YV12;
        VuforiaARController ctrInstance = VuforiaARController.Instance;

        ctrInstance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
        ctrInstance.RegisterTrackablesUpdatedCallback(OnTrackablesUpdated);
        ctrInstance.RegisterOnPauseCallback(OnPause);
    }
Ejemplo n.º 8
0
    void Start()
    {
        VuforiaARController vuforia = VuforiaARController.Instance;

        if (vuforia != null)
        {
            vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
        }
    }
Ejemplo n.º 9
0
    /// <summary>
    /// 初期化
    /// </summary>
    void Start()
    {
        // インスタンス取得できたら、Vuforiaスタートコールバックを設定
        VuforiaARController vuforia = VuforiaARController.Instance;

        if (vuforia != null)
        {
            vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
        }
    }
Ejemplo n.º 10
0
    void Start()
    {
        //VuforiaAbstractBehaviour vuforia = FindObjectOfType<VuforiaAbstractBehaviour>();
        //VuforiaBehaviour vuforia = (VuforiaBehaviour)FindObjectOfType(typeof(VuforiaBehaviour));

        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.RegisterVuforiaStartedCallback(OnVuforiaStarted);
        vuforia.RegisterOnPauseCallback(OnPaused);
    }
Ejemplo n.º 11
0
    void Start()
    {
        Debug.Log("CAMERAFOCUSCONTROLLER: Start called");

        VuforiaARController vuforia = VuforiaARController.Instance;

        if (vuforia != null)
        {
            vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
        }
    }
Ejemplo n.º 12
0
    // Use this for initialization
    void Start()
    {
        rotations = new Queue <Quaternion>(smoothingFrames);
        positions = new Queue <Vector3>(smoothingFrames);

        VuforiaARController vuforia = VuforiaARController.Instance;

//		qcarBehavior.RegisterVuforiaStartedCallback(OnInitialized);
//		qcarBehavior.RegisterTrackablesUpdatedCallback(OnTrackablesUpdated);

        vuforia.RegisterVuforiaStartedCallback(OnInitialized);
        vuforia.RegisterTrackablesUpdatedCallback(OnTrackablesUpdated);
    }
Ejemplo n.º 13
0
 private void DrawDigitalEyewearInspector(VuforiaARController.WorldCenterMode worldCenterMode, bool showCameraAnchors)
 {
     EditorGUILayout.PropertyField(this.mCentralAnchorPoint, new GUIContent("Central Anchor Point"), new GUILayoutOption[0]);
     if (showCameraAnchors && worldCenterMode != VuforiaARController.WorldCenterMode.CAMERA && worldCenterMode != VuforiaARController.WorldCenterMode.DEVICE_TRACKING)
     {
         EditorGUILayout.HelpBox("Using world center mode " + worldCenterMode + " when binding to a camera controlled by another SDK is non-trivial. Please consult the developer guide for more information", MessageType.Info);
         UnityEngine.Object objectReferenceValue = this.mParentAnchorPoint.objectReferenceValue;
         EditorGUILayout.PropertyField(this.mParentAnchorPoint, new GUIContent("Parent Anchor Point"), new GUILayoutOption[0]);
         if (this.ParentAnchorPoint != objectReferenceValue && this.ParentAnchorPoint != null && this.CentralAnchorPoint != null && this.ParentAnchorPoint != this.CentralAnchorPoint && !this.CentralAnchorPoint.IsChildOf(this.ParentAnchorPoint))
         {
             EditorWindow.focusedWindow.ShowNotification(new GUIContent(this.ParentAnchorPoint.gameObject.name + " is not a parent of " + this.CentralAnchorPoint.gameObject.name + "!"));
             this.ParentAnchorPoint = this.CentralAnchorPoint;
         }
     }
     else
     {
         this.ParentAnchorPoint = this.CentralAnchorPoint;
     }
     if (showCameraAnchors)
     {
         EditorGUILayout.PropertyField(this.mPrimaryCamera, new GUIContent("Left Camera"), new GUILayoutOption[0]);
         if (this.PrimaryCamera != null && !VuforiaARController.IsValidPrimaryCamera(this.PrimaryCamera))
         {
             EditorGUILayout.HelpBox("The selected camera needs to be upgraded to be used for Augmented Reality. Please click the button below to do that.", MessageType.Warning);
             if (GUILayout.Button(new GUIContent("Add Vuforia Components", "Adds the VideoBackgroundBehaviour, HideExcessBehaviour and a background plane."), new GUILayoutOption[0]))
             {
                 this.AddPrimaryCameraComponents(this.PrimaryCamera, this.mBhvr);
             }
             EditorGUILayout.Space();
         }
         EditorGUILayout.PropertyField(this.mSecondaryCamera, new GUIContent("Right Camera"), new GUILayoutOption[0]);
         if (this.SecondaryCamera != null && !VuforiaARController.IsValidSecondaryCamera(this.SecondaryCamera))
         {
             EditorGUILayout.HelpBox("The selected camera needs to be upgraded to be used for Augmented Reality. Please click the button below to do that.", MessageType.Warning);
             if (GUILayout.Button(new GUIContent("Add Vuforia Components", "Adds the VideoBackgroundBehaviour and HideExcessBehaviour."), new GUILayoutOption[0]))
             {
                 this.AddSecondaryCameraComponents(this.SecondaryCamera, this.mBhvr);
                 return;
             }
         }
     }
     else if (PlayerSettings.defaultInterfaceOrientation != UIOrientation.LandscapeLeft)
     {
         PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft;
         Debug.Log("Setting Default Orientation to Landscape Left");
     }
 }
Ejemplo n.º 14
0
    void Start()
    {
        if (Application.loadedLevel == 14 || Application.loadedLevel == 13 || Application.loadedLevel == 8 || Application.loadedLevel == 9 || Application.loadedLevel == 10 || Application.loadedLevel == 11 || Application.loadedLevel == 7)
        {
            VuforiaARController vuforia = VuforiaARController.Instance;

            if (vuforia != null)
            {
                vuforia.RegisterVuforiaStartedCallback(SetAutofocus);
            }
            ARcam.SetActive(true);
        }
        else
        {
            ARcam.SetActive(false);
        }
        //MAINcamera_off ();
    }
Ejemplo n.º 15
0
    // Start is called before the first frame update
    void Start()
    {
        if (ImageTarget_Top != null && ImageTarget_Bottom != null && ImageTargetQR != null && toggleSwitchBoxQR != null)
        {
            //all true to initialize correctly the AR Camera with all targets
            ImageTargetQR.SetActive(true);
            ImageTarget_Top.SetActive(true);
            ImageTarget_Bottom.SetActive(true);
            //to activate it later
            //toggleSwitchBoxQR.SetActive(false);

            VuforiaARController vuforia = VuforiaARController.Instance;
            //crucial to launch Vuforia before setting the toggle : because incative target will not be taken into account by AR camera at the first launch
            if (vuforia != null)
            {
                vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
            }
        }
    }
    private void Start()
    {
        VuforiaARController vb = VuforiaARController.Instance;

        vb.RegisterVuforiaStartedCallback(LoadDataSet);
    }
Ejemplo n.º 17
0
    private void Start()
    {
        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.RegisterVuforiaStartedCallback(Focus);
    }
Ejemplo n.º 18
0
 // Use this for initialization
 void Start()
 {
     VuforiaARController vuforia = VuforiaARController.Instance;
 }
Ejemplo n.º 19
0
 private void OnDestroy()
 {
     _vuforia.UnregisterVuforiaStartedCallback(OnInitialized);
     _vuforia.UnregisterTrackablesUpdatedCallback(OnTrackablesUpdated);
     _vuforia = null;
 }