/** * Use this for initialization. */ private void Start() { // Variable initialization this.ShouldCapture = false; this.photoCaptureObject = null; this.isProcessing = false; this.tryStartPhotoMode = false; this.tryStopPhotoMode = false; this.CaptureStarted = false; this.timeSinceLastFocusChange = 0.0f; this.resetTime = false; this.photoCount = 1; this.waitMode = false; this.waitCounter = 0; this.focusedObjectTag = ""; this.active = false; this.disposeAction = null; // Get reference to other scripts in the scene this.logger = DebugLogger.Instance; this.objectRecognition = ObjectRecognition.Instance; this.gazeManager = GazeManager.Instance; // Deactivate this script if necessary components are missing if ((this.logger == null) || (this.objectRecognition == null) || (this.gazeManager == null)) { Debug.LogError("PhotoCapture: Script references not set properly."); this.enabled = false; return; } // Subscibe to notifications about focused objects this.gazeManager.FocusedObjectChanged += this.OnFocusedObjectChanged; // Set camera parameters and create a MR-PhotoCapture object this.cameraParameters = new MRC.CameraParameters { hologramOpacity = 0.0f, cameraResolutionWidth = this.CameraResolution.width, cameraResolutionHeight = this.CameraResolution.height, pixelFormat = MRC.CapturePixelFormat.BGRA32 }; MRC.PhotoCapture.CreateAsync(false, this.OnPhotoCaptureCreated); }
/** * Use this for initialization. */ private void Start() { // Variable initialization this.ReadyToStartRecognition = false; this.initFinished = false; this.dataLoadingFinished = false; this.objectRecognitionConfigured = false; this.openMenu = false; // Get reference to other scripts in the scene this.dataLoader = DataLoader.Instance; this.config = IPConfig.Instance; this.objectRecognition = ObjectRecognition.Instance; this.infoCanvas = InfoCanvas.Instance; // Check references if ((this.dataLoader == null) || (this.config == null) || (this.objectRecognition == null) || (this.text == null) || (this.cursor == null) || (this.mainMenu == null) || (this.infoCanvas == null)) { Debug.Log("Initializer: Script references not set properly."); this.enabled = false; } }