コード例 #1
0
 public void Release()
 {
     OnStart     =
         OnFrame = null;
     core.Call("release");
     if (preview != null)
     {
         MonoBehaviour.Destroy(preview);
     }
     preview = null;
     if (dispatch != null)
     {
         dispatch.Release();
     }
     dispatch = null;
 }
コード例 #2
0
 private void SetDetection(bool state)
 {
     if (state)
     {
         OnFrame         -= MetadataUpdate;
         OnFrame         += MetadataUpdate;
         metadataDispatch = metadataDispatch ?? new ConcurrentDispatch();
     }
     else
     {
         OnFrame   -= MetadataUpdate;
         OnMetadata = null;
         if (metadataDispatch != null)
         {
             metadataDispatch.Release();
         }
         metadataDispatch = null;
     }
 }
コード例 #3
0
 public void Release()
 {
     if (!preview)
     {
         return;
     }
     OnStart     =
         OnFrame = null;
     #if NATCAM_PRO || NATCAM_PROFESSIONAL
     ReleaseBuffer();
     #endif
     preview.Stop();
     MonoBehaviour.Destroy(preview);
     preview     = null;
     photoBuffer = null;
     dispatch.Release();
     dispatch = null;
     camera   = -1;
 }
コード例 #4
0
 public void Release()
 {
     if (!preview)
     {
         return;
     }
     OnStart     =
         OnFrame = null;
     #if NATCAM_EXTENDED
     SetDetection(false);
     OnMetadata = null;
     #endif
     #if NATCAM_PROFESSIONAL
     ReleasePreviewBuffer();
     #endif
     preview.Stop();
     MonoBehaviour.Destroy(preview);
     preview = null;
     dispatch.Release();
     dispatch = null;
     camera   = -1;
 }