UE4: output game frames to file

你说的曾经没有我的故事 提交于 2019-12-05 19:41:10

For anyone else who wants to do this, you have a couple of options.

Option A

If you don't care how many screenshot files are generated and don't care what they are called, then you can use a blueprint:

The images will be output to \Unreal Projects\ProjectName\Saved\Screenshots\Windows where ProjectName is the name of your project.

Option B

If you don't want multiple screenshot files and need control over where they go, then you can do this via code:

//Called every frame
void AMyDempActor::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);

    FString filename = "test.png";
    FScreenshotRequest::RequestScreenshot(filename, false, false);

}

Here is the documentation on FScreenshotRequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!