public bool IsStrategySwitchedPressed(out InputStrategy inputStrategy) { inputStrategy = new KeyboardInputStrategy(); return(Input.GetMouseButton(1)); }
/// <inheritdoc/> protected internal override void BeginRecording(RecordingSession session) { if (cbSettings.FlipFinalOutput) { m_VFlipper = new TextureFlipper(); } if (UnityHelpers.UsingLegacyRP()) { m_InputStrategy = new CameraCommandBufferLegacyInputStrategy(cbSettings.RecordTransparency); } else { m_InputStrategy = new CaptureCallbackSRPInputStrategy(cbSettings.RecordTransparency); } switch (cbSettings.Source) { case ImageSource.ActiveCamera: case ImageSource.MainCamera: case ImageSource.TaggedCamera: { OutputWidth = cbSettings.OutputWidth; OutputHeight = cbSettings.OutputHeight; if (cbSettings.outputImageHeight != ImageHeight.Window) { var size = GameViewSize.SetCustomSize(OutputWidth, OutputHeight); if (size == null) { size = GameViewSize.AddSize(OutputWidth, OutputHeight); } if (GameViewSize.modifiedResolutionCount == 0) { GameViewSize.BackupCurrentSize(); } else { if (size != GameViewSize.currentSize) { Debug.LogError($"Requesting a resolution change (to {OutputWidth}x{OutputHeight}) while a recorder's input has already requested one! Undefined behaviour. Count: {GameViewSize.modifiedResolutionCount}"); } } GameViewSize.modifiedResolutionCount++; m_ModifiedResolution = true; GameViewSize.SelectSize(size); } break; } default: throw new ArgumentOutOfRangeException(); } if (cbSettings.CaptureUI) { var uiGO = new GameObject(); uiGO.name = "UICamera"; uiGO.transform.parent = session.recorderGameObject.transform; m_UICamera = uiGO.AddComponent <Camera>(); m_UICamera.cullingMask = 1 << 5; m_UICamera.clearFlags = CameraClearFlags.Depth; m_UICamera.renderingPath = RenderingPath.DeferredShading; m_UICamera.targetTexture = OutputRenderTexture; m_UICamera.enabled = false; } }
public bool IsStrategySwitchedPressed(out InputStrategy inputStrategy) { inputStrategy = new MouseInputStrategy(); return(Input.GetKey(KeyCode.Tab)); }