Exemplo n.º 1
0
    // Use this for clean up
    void OnDisable()
    {
        /* Clean Up */
        if (sampleReader != null)
        {
            sampleReader.SampleArrived -= SampleArrived;
            sampleReader.Dispose();
        }

        if (sm != null)
        {
            sm.Dispose();
        }
    }
Exemplo n.º 2
0
    void OnDestroy()
    {
        // 平滑化開放
        if (SmoothTongue != null)
        {
            SmoothTongue.Dispose();
        }
        if (SmoothMouth != null)
        {
            SmoothMouth.Dispose();
        }
        if (SmoothKiss != null)
        {
            SmoothKiss.Dispose();
        }
        if (SmoothSmile != null)
        {
            SmoothSmile.Dispose();
        }
        if (SmoothBrowLow != null)
        {
            SmoothBrowLow.Dispose();
        }
        if (SmoothBrowRai != null)
        {
            SmoothBrowRai.Dispose();
        }
        if (SmoothEyesClose != null)
        {
            SmoothEyesClose.Dispose();
        }
        if (SmoothEyes != null)
        {
            SmoothEyes.Dispose();
        }
        if (SmoothHead != null)
        {
            SmoothHead.Dispose();
        }
        if (SmoothBody != null)
        {
            SmoothBody.Dispose();
        }
        if (Smoother != null)
        {
            Smoother.Dispose();
        }

        // RealSense開放
        if (SampleReader != null)
        {
            SampleReader.SampleArrived -= SampleReader_SampleArrived;
        }
        if (SampleReader != null)
        {
            SampleReader.Dispose();
        }
        if (FaceModule != null)
        {
            FaceModule.FrameProcessed -= FaceModule_FrameProcessed;
        }
        if (FaceData != null)
        {
            FaceData.Dispose();
        }
        if (FaceConfig != null)
        {
            FaceConfig.Dispose();
        }
        if (FaceModule != null)
        {
            FaceModule.Dispose();
        }
        if (SenseManager != null)
        {
            SenseManager.Dispose();
        }
    }