/// <summary> /// Raises the destroy event. /// </summary> void OnDestroy() { if (m_tangoApplication) { m_tangoApplication.UnregisterPermissionsCallback(_OnTangoPermissionsEvent); m_tangoApplication.UnregisterOnTangoConnect(_OnTangoServiceConnected); m_tangoApplication.UnregisterOnTangoDisconnect(_OnTangoServiceDisconnected); m_tangoApplication.Unregister(this); } }