/// <summary> /// Connect to the Tango Service. /// </summary> private void _TangoConnect() { if (!m_isServiceInitialized) { return; } if (!m_isServiceConnected) { m_isServiceConnected = true; AndroidHelper.PerformanceLog("Unity _TangoConnect start"); if (TangoServiceAPI.TangoService_connect(m_callbackContext, m_tangoConfig.GetHandle()) != Common.ErrorType.TANGO_SUCCESS) { AndroidHelper.ShowAndroidToastMessage("Failed to connect to Tango Service."); Debug.Log(CLASS_NAME + ".Connect() Could not connect to the Tango Service!"); } else { AndroidHelper.PerformanceLog("Unity _TangoConnect end"); Debug.Log(CLASS_NAME + ".Connect() Tango client connected to service!"); if (OnTangoConnect != null) { OnTangoConnect(); } } } }
/// <summary> /// Connect to the Tango Service. /// </summary> private void _TangoConnect() { if (!m_isServiceConnected) { m_isServiceConnected = true; AndroidHelper.PerformanceLog("Unity _TangoConnect start"); if (TangoServiceAPI.TangoService_connect(m_callbackContext, TangoConfig.GetConfig()) != Common.ErrorType.TANGO_SUCCESS) { Debug.Log(CLASS_NAME + ".Connect() Could not connect to the Tango Service!"); } else { AndroidHelper.PerformanceLog("Unity _TangoConnect end"); Debug.Log(CLASS_NAME + ".Connect() Tango client connected to service!"); } } }