Beispiel #1
0
    void OnDisable()
    {
        Debug.Log("OnDisable: deleting metaio sdk...");

        // stop camera before deleting the instance
        MetaioSDKUnity.stopCamera();

        // delete the instance
        MetaioSDKUnity.deleteMetaioSDKUnity();
    }
Beispiel #2
0
    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);
            }
        }
    }