# Delegates as Parameter

**URL:** <https://forums.unrealengine.com/t/delegates-as-parameter/299175>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 17, 2014, 1:14pm UTC](https://forums.unrealengine.com/t/delegates-as-parameter/299175 "2014-11-17T13:14:31Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![manoelneto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@manoelneto](https://forums.unrealengine.com/u/manoelneto)\
**Post date:** [April 14, 2016, 6:58pm UTC](https://forums.unrealengine.com/t/delegates-as-parameter/299175/13 "2016-04-14T18:58:04Z")

</div>

Sure, here’s some snippets from our project:

Declaring the delegate type:

```
DECLARE_DYNAMIC_DELEGATE_OneParam(FOnlineUserImageRetrievedDelegate, UTexture2D*, Texture);

```

Declaring a method that takes the delegate as a parameter:

```
/* Retrieves the user thumbnail texture*/
UFUNCTION(BlueprintCallable, Category = OnlineUser)
void RetrieveThumbnail(const FOnlineUserImageRetrievedDelegate& Callback);

```

Declaring a variable to store the delegate:

```
FOnlineUserImageRetrievedDelegate ImageRetrievedDelegate;

```

The implementation does something like this:

```
void UOnlineUser::RetrieveThumbnail(const FOnlineUserImageRetrievedDelegate& Callback)
{
    ImageRetrievedDelegate = Callback;
}

```

And to call the delegate something like this:

```
ImageRetrievedDelegate.ExecuteIfBound(ThumbnailTexture);

```

And it looks like this in the blueprint:

![86888-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/9/7e92c63b537f23ccbb653a1afc32b5ef490bc215.png)

---

_[View the full topic](https://forums.unrealengine.com/t/delegates-as-parameter/299175)._
