/// <summary> /// Unity Start function. /// /// We find and assign pose controller and tango application, and register this class to callback events. /// </summary> public void Start() { m_poseController = FindObjectOfType <TangoPoseController>(); m_tangoApplication = FindObjectOfType <TangoApplication>(); if (m_tangoApplication != null) { m_tangoApplication.Register(this); } }
/// <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_poseController = FindObjectOfType <TangoPoseController>(); 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(); } } }