public void Start() { m_tangoApplication = FindObjectOfType<TangoApplication>(); if (m_tangoApplication != null) { m_tangoApplication.Register(this); m_tangoApplication.RequestPermissions(); } }
/// <summary> /// Start is called on the frame when a script is enabled. /// </summary> public void Start() { m_tangoApplication = FindObjectOfType<TangoApplication>(); m_tangoARScreen = GetComponent<TangoARScreen>(); if (m_tangoApplication != null) { if (AndroidHelper.IsTangoCorePresent()) { // Request Tango permissions m_tangoApplication.Register(this); m_tangoApplication.RequestPermissions(); } else { // If no Tango Core is present let's tell the user to install it! StartCoroutine(_InformUserNoTangoCore()); } } else { Debug.Log("No Tango Manager found in scene."); } }
/// <summary> /// Unity Start function. /// /// This function is responsible for connecting callbacks, set up TangoApplication and initialize the data list. /// </summary> public void Start() { m_tangoApplication = FindObjectOfType<TangoApplication>(); if (m_tangoApplication != null) { m_tangoApplication.Register(this); if (AndroidHelper.IsTangoCorePresent()) { m_tangoApplication.RequestPermissions(); } } else { Debug.Log("No Tango Manager found in scene."); } }
/// <summary> /// Unity Start function. /// /// This function is responsible for initialization, including setting up m_fileSender and joining or creating a /// Photon room. /// </summary> public void Start() { m_cubeSize = m_cubePrefab[0].transform.lossyScale.x; m_progressPanel.SetActive(false); m_tangoApplication = FindObjectOfType<TangoApplication>(); if (m_tangoApplication == null) { _QuitGame(); } m_tangoApplication.Register(this); m_tangoApplication.RequestPermissions(); m_fileSender = GetComponent<RPCFileSender>(); m_fileSender.OnPackageReceived += _OnAreaDescriptionTransferReceived; m_fileSender.OnPackageTransferFinished += _OnAreaDescriptionTransferFinished; m_fileSender.OnPackageTransferStarted += _OnAreaDescriptionTransferStarted; m_fileSender.OnPackageTransferError += _OnAreaDescriptionTransferError; if (!PhotonNetwork.insideLobby) { AndroidHelper.ShowAndroidToastMessage("Please wait to join the room until you are in lobby."); return; } if (Globals.m_curAreaDescription == null) { PhotonNetwork.JoinRandomRoom(); } else { PhotonNetwork.CreateRoom("Random Room"); } }
/// <summary> /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. /// </summary> public void Start() { m_meshSavePath = Application.persistentDataPath + "/meshes"; Directory.CreateDirectory(m_meshSavePath); m_arPoseController = FindObjectOfType<TangoARPoseController>(); m_tangoDynamicMesh = FindObjectOfType<TangoDynamicMesh>(); m_areaDescriptionLoaderPanel.SetActive(true); m_meshBuildPanel.SetActive(false); m_meshInteractionPanel.SetActive(false); m_relocalizeImage.gameObject.SetActive(false); // Initialize tango application. m_tangoApplication = FindObjectOfType<TangoApplication>(); if (m_tangoApplication != null) { m_tangoApplication.Register(this); if (AndroidHelper.IsTangoCorePresent()) { m_tangoApplication.RequestPermissions(); } } }
/// <summary> /// Start is called on the frame when a script is enabled. /// </summary> public void Start() { m_tangoApplication = FindObjectOfType<TangoApplication>(); m_characterController = GetComponent<CharacterController>(); if (m_tangoApplication != null) { m_tangoApplication.Register(this); if (AndroidHelper.IsTangoCorePresent()) { // Request Tango permissions m_tangoApplication.RequestPermissions(); } else { // If no Tango Core is present let's tell the user to install it! StartCoroutine(_InformUserNoTangoCore()); } } else { Debug.Log("No Tango Manager found in scene."); } SetPose(transform.position, transform.rotation); }