void OnDisable() { Debug.Log("OnDisable: deleting metaio sdk..."); // stop camera before deleting the instance MetaioSDKUnity.stopCamera(); // delete the instance MetaioSDKUnity.deleteMetaioSDKUnity(); }
void OnApplicationPause(bool pause) { Debug.Log("OnApplicationPause: " + pause); if (pause) { MetaioSDKUnity.pauseSensors(); if (MetaioSDKUnity.usingCamera) { MetaioSDKUnity.stopCamera(); } } else { MetaioSDKUnity.resumeSensors(); if (MetaioSDKUnity.usingCamera) { // Resume same camera as previously set MetaioSDKUnity.startCamera(MetaioSDKUnity.requestedCamera); } } }