Announcement

Collapse
No announcement yet.

How to use ENQUEUE_RENDER_COMMAND instead of ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to use ENQUEUE_RENDER_COMMAND instead of ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER

    Hi,
    I'm trying to fix a deprecation warning in AirSim plugin for UE4.22.

    Code:
    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]
    https://github.com/Microsoft/AirSim/...st.cpp#L77-L83

    Code:
    ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER(
            SceneDrawCompletion,
            RenderRequest *, This, this,
            {
                    This->ExecuteTask();
            }
    );
    How can I change the above call to use the new ENQUEUE_RENDER_COMMAND macro?
    Last edited by Elvis Dowson; 04-19-2019, 02:18 AM.

    #2
    Try this:

    Code:
    RenderRequest* This = this;
    
    ENQUEUE_RENDER_COMMAND(SceneDrawCompletion)(
    [This](FRHICommandListImmediate& RHICmdList)
    {
        This->ExecuteTask();
    });

    Comment

    Working...
    X