// Use this for initialization void Start() { rotations = new Queue<Quaternion>(smoothingFrames); positions = new Queue<Vector3>(smoothingFrames); qcarBehavior = GetComponent<VuforiaBehaviour>(); qcarBehavior.RegisterTrackerEventHandler(this); }
// Update is called once per frame void Update() { if (PhotonNetwork.inRoom || !_network.useNetwork) { bool isClient = _network.useNetwork && PhotonNetwork.inRoom && !PhotonNetwork.isMasterClient; if (isClient) { lobbyCamera.SetActive(false); } gameObject.transform.GetChild(0).gameObject.SetActive(isClient); AudioListener al = gameObject.GetComponent <AudioListener> (); if (al) { al.enabled = isClient; } Vuforia.VuforiaBehaviour vb = gameObject.GetComponent <Vuforia.VuforiaBehaviour> (); if (vb) { vb.enabled = isClient; } Vuforia.DefaultInitializationErrorHandler dieh = gameObject.GetComponent <Vuforia.DefaultInitializationErrorHandler> (); if (dieh) { dieh.enabled = isClient; } } }
// Use this for initialization void Start() { rotations = new Queue<Quaternion>(smoothingFrames); positions = new Queue<Vector3>(smoothingFrames); qcarBehavior = GetComponent<VuforiaBehaviour>(); //qcarBehavior.RegisterTrackerEventHandler(this); qcarBehavior.RegisterVuforiaStartedCallback(OnInitialized); qcarBehavior.RegisterTrackablesUpdatedCallback(OnTrackablesUpdated); }
// Use this for initialization void Start() { Vuforia = FindObjectOfType<VuforiaBehaviour>(); }
public void Awake() { SceneManager.activeSceneChanged += ResetScene; // subscribe Vuforia = GameObject.FindWithTag("Singleton").GetComponent <SingletonControl>().Camera.GetComponent <Vuforia.VuforiaBehaviour>(); }
private void Awake() { vuforiaBehaviour = GetComponent(typeof(VuforiaBehaviour)) as VuforiaBehaviour; }