# How to use ENQUEUE\_RENDER\_COMMAND instead of ENQUEUE\_UNIQUE\_RENDER\_COMMAND\_ONEPARAMETER

**URL:** <https://forums.unrealengine.com/t/how-to-use-enqueue-render-command-instead-of-enqueue-unique-render-command-oneparameter/125007>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub, Engine-Source-GitHub\
**Created:** [April 16, 2019, 12:06pm UTC](https://forums.unrealengine.com/t/how-to-use-enqueue-render-command-instead-of-enqueue-unique-render-command-oneparameter/125007 "2019-04-16T12:06:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvis.dowson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@elvis.dowson](https://forums.unrealengine.com/u/elvis.dowson)\
**Post date:** [April 16, 2019, 12:06pm UTC](https://forums.unrealengine.com/t/how-to-use-enqueue-render-command-instead-of-enqueue-unique-render-command-oneparameter/125007/1 "2019-04-16T12:06:04Z")

</div>

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

```auto

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](https://github.com/Microsoft/AirSim/blob/master/Unreal/Plugins/AirSim/Source/RenderRequest.cpp#L77-L83)

```auto

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?

---

<div class="post-metadata">

**Author:** ![HelloEnjoy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HelloEnjoy](https://forums.unrealengine.com/u/HelloEnjoy)\
**Post date:** [April 23, 2019, 4:50pm UTC](https://forums.unrealengine.com/t/how-to-use-enqueue-render-command-instead-of-enqueue-unique-render-command-oneparameter/125007/2 "2019-04-23T16:50:04Z")

</div>

Try this:

```auto

RenderRequest* This = this;

ENQUEUE_RENDER_COMMAND(SceneDrawCompletion)(
[This](FRHICommandListImmediate& RHICmdList)
{
    This->ExecuteTask();
});

```
