private void Start() { this.mVideoBgMgr = VideoBackgroundManager.Instance; this.CheckForChangedClippingMode(); this.mVuforiaBehaviour = VuforiaARController.Instance; this.mVuforiaBehaviour.RegisterVuforiaStartedCallback(new Action(this.OnVuforiaStarted)); this.mVuforiaBehaviour.RegisterTrackablesUpdatedCallback(new Action(this.OnTrackablesUpdated)); }
private void ResolveMembers() { if (this.mVuforiaBehaviour == null) { this.mVuforiaBehaviour = VuforiaARController.Instance; } if (this.mDigitalEyewearBehaviour == null) { this.mDigitalEyewearBehaviour = DigitalEyewearARController.Instance; } if (this.mDigitalEyewearBehaviour.GetEyewearType() == DigitalEyewearARController.EyewearType.VideoSeeThrough) { if (!this.mFrameWorkHasBeenSetExternally) { this.mStereoFramework = this.mDigitalEyewearBehaviour.GetStereoCameraConfig(); if (!this.mViewerHasBeenSetExternally) { this.mViewerParameters = Device.Instance.GetSelectedViewer(); } if (this.mStereoFramework != DigitalEyewearARController.StereoFramework.Vuforia) { this.mCentralAnchorPoint = this.mDigitalEyewearBehaviour.CentralAnchorPoint; this.mLeftCameraOfExternalSDK = this.mDigitalEyewearBehaviour.PrimaryCamera; this.mRightCameraOfExternalSDK = this.mDigitalEyewearBehaviour.SecondaryCamera; } } } else if (!this.mFrameWorkHasBeenSetExternally) { this.mStereoFramework = DigitalEyewearARController.StereoFramework.Vuforia; this.mDigitalEyewearBehaviour.SetCameraOffset(0.06f); this.mDigitalEyewearBehaviour.SetDistortionRendering(DistortionRenderingMode.SingleTexture); if (!this.mViewerHasBeenSetExternally) { this.mViewerParameters = null; } } if (this.mViewerParameters == null) { IViewerParametersList viewerList = Device.Instance.GetViewerList(); if (viewerList != null) { this.mViewerParameters = viewerList.Get(0); } } if (this.mVideoBackgroundManager == null) { this.mVideoBackgroundManager = VideoBackgroundManager.Instance; } }
protected override void Awake() { VuforiaAbstractConfiguration.GenericVuforiaConfiguration vuforia = VuforiaAbstractConfiguration.Instance.Vuforia; this.CameraDeviceModeSetting = vuforia.CameraDeviceMode; this.MaxSimultaneousImageTargets = vuforia.MaxSimultaneousImageTargets; this.MaxSimultaneousObjectTargets = vuforia.MaxSimultaneousObjectTargets; this.UseDelayedLoadingObjectTargets = vuforia.UseDelayedLoadingObjectTargets; this.CameraDirection = vuforia.CameraDirection; this.MirrorVideoBackground = vuforia.MirrorVideoBackground; this.mWorldCenterMode = base.VuforiaBehaviour.WorldCenterMode; this.mWorldCenter = base.VuforiaBehaviour.WorldCenter; this.mEyewearBehaviour = DigitalEyewearARController.Instance; if (this.mEyewearBehaviour == null) { Debug.LogError("Failed to get an instance of DigitalEyewearBehaviour"); } this.mVideoBackgroundMgr = VideoBackgroundManager.Instance; this.mVideoBackgroundMgr.Initialize(); }