[Bug] Can't create capture starting Unity paused
ChocDino-Andy opened this issue · 1 comments
Unity Version
2019.4.40
AVPro Movie Capture Version
5.2.4
Which platform(s) are you using?
Windows
Which OS version(s) are you using?
No response
Which rendering API(s) are you using?
No response
Hardware
No response
Which capture component are you using?
Capture From Screen
Capture mode
Realtime
Which output mode are you using?
Video file
Video codecs
H264
Audio source
None
Audio codecs
AAC
Any other component configuration
No response
The issue
I want to start Unity in a paused state, and then manually start capturing and unpause Unity. This gives the best results generally otherwise the Unity may already have renderered the first few frames before capture begins.
Steps to reproduce:
- Press pause in Unity editor
- Press play in Unity editor
- Press "Start Capture" in AVPro Movie Capture window
Ideally now capture would start but be paused until Unity editor is unpaused, but that doesn't happen.
You'll see the capture tries to start, but stops and doesn't show the encodings stats display..
To fix this, add this check for paused state to CaptureEditorWindow.cs:1126
if (!EditorApplication.isPaused)
{
if (!_capture.IsPrepared() || (_capture.StopMode != StopMode.None && _capture.CaptureStats.NumEncodedFrames > 0 && !_capture.IsCapturing() && !_capture.IsStartCaptureQueued()))
{
StopCapture();
}
}
This will prevent the logic from calling StopCapture() in this case...
Thanks!
Log output
No response
Have you looked into using _capture.PauseCaptureOnAppPause = false
?