void AMyPawn::StartRecord(const FString& Str)
{
IVideoRecordingSystem* Video = IPlatformFeaturesModule::Get().GetVideoRecordingSystem();
FVideoRecordingParameters Param;
Param.RecordingLengthSeconds = 700;
Video->EnableRecording(true);
Video->NewRecording(*Str, Param);
Video->StartRecording();
}
When I use NewRecording(), the compiler will report errors.
0x00007FFC023D7D81 (UE4Editor-GameplayMediaEncoder.dll)处(位于 UE4Editor.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000000 时发生访问冲突。
Exception thrown at 0x00007ffc023d7d81 (ue4editor gameplaymediaencoder. DLL) (in ue4editor. Exe): 0xc0000005: access violation occurred while reading location 0x0000000000000000.
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 703]
Array index out of bounds: 0 from an array of size 0
How to solve this problem?