Beispiel #1
0
    /// <summary>
    /// Stop this camera.
    /// </summary>
    public void Stop()
    {
        if (!isRunning)
        {
            return;
        }

                #if UNITY_ANDROID && !UNITY_EDITOR
        if (isUseEasyWebCam)
        {
            EasyWebCam.Stop();
        }
        else
        {
            webcamera.Stop();
        }
                #else
        webcamera.Stop();
                #endif
        isRunning = false;
    }
    /// <summary>
    /// Stop this camera.
    /// </summary>
    public void Stop()
    {
        if (!isRunning)
        {
            return;
        }
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
        if (isUseEasyWebCam)
        {
            EasyWebCam.Stop();
        }
        else
        {
            if (webcamera != null)
            {
                webcamera.Stop();
            }
        }
#else
        webcamera.Stop();
#endif
        isRunning = false;
    }