Keywords: UE4, Programming Debug Tricks Notes

Usages

How to convert Texture2D asset to pixel of image in raw data format

https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/ImageWriteQueue/Private/ImageWriteBlueprintLibrary.cpp#L59

Issues

Please use ENQUEUE_RENDER_COMMAND instead Please update your code to the new API before upgrading to the next release

Warning on compiling:

warning: Please use ENQUEUE_RENDER_COMMAND instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-W#pragma-messages]

Caused by:
ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER was obsolete, use ENQUEUE_RENDER_COMMAND instead`.

Solution:

MyRenderingHandle* Handle = CreateMyRenderingHandle();

ENQUEUE_RENDER_COMMAND(MyRenderingCommand)(
[Handle](FRHICommandListImmediate& RHICmdList)
{
    Handle->ExecuteMyRenderTask();
});

Reference:
UE4.24源码分析 - ENQUEUE_RENDER_COMMAND
https://zhuanlan.zhihu.com/p/149917554

How to use ENQUEUE_RENDER_COMMAND instead of ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER
https://forums.unrealengine.com/development-discussion/engine-source-github/1608365-how-to-use-enqueue_render_command-instead-of-enqueue_unique_render_command_oneparameter


``