public static void Initialize(PreviewType previewType, bool metadataDetection) { mReadablePreview = previewType == PreviewType.Readable; mPhotoSaveMode = (int)SaveMode.DoNotSave; mMetadataDetection = metadataDetection; listener = new GameObject("NatCamHelper").AddComponent <NatCamHelper>(); Dispatch = NatCamDispatch.Prepare(DispatchMode.Synchronous, listener); RegisterCallbacks(Render, Update, UpdatePhoto, UpdateCode, UpdateFace); InspectDeviceCameras(); isInitialized = true; Ext.LogVerbose("Initialized native interface"); }
private static FaceCallback PropagateFace; //Maybe one day #endregion #region ---Public Ops--- public static void Initialize(bool metadataDetection) { if (!supportedDevice) { return; } mMetadataDetection = metadataDetection; Dispatch = NatCamDispatch.Prepare(DispatchMode.Synchronous); Dispatch.DispatchContinuous(Update); if (mMetadataDetection) { MetadataDispatch = NatCamDispatch.Prepare(DispatchMode.Asynchronous); MetadataDispatch.DispatchContinuous(UpdateMetadata); } isInitialized = true; Ext.LogVerbose("Initialized fallback interface"); }