> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Runtime Asset Swapping

> Swap image assets at runtime in Unreal via data binding.

## Overview

To change a Rive file's images at runtime in Unreal, bind a `UTexture` to a ViewModel image property exposed via data binding in the Rive editor.

<Warning>
  The Rive renderer requires image textures to use **premultiplied alpha** (AlphaComposite-style blending). Textures authored with straight alpha can show:

  * Dark or black fringes around transparent edges
  * Incorrect compositing against the background
  * Loss of alpha
  * Overly bright / oversaturated images

  Export or preprocess textures with premultiplied alpha before using them at runtime.
</Warning>

### Blueprint

Call **Set Image Value** (category *Rive → Data Binding*) on your `RiveViewModel` reference. Enter the image property name (as exposed on the ViewModel via data binding) and pick the source texture from the *In Image* dropdown.

<img src="https://mintcdn.com/rive/ZTVf4gcrrSPE8RSz/images/unreal/ImageSwapDatabinding1.png?fit=max&auto=format&n=ZTVf4gcrrSPE8RSz&q=85&s=4a857b37e1a9b97736df5ea5da682933" alt="Setting an image property via databinding" width="1660" height="750" data-path="images/unreal/ImageSwapDatabinding1.png" />

### C++

```cpp theme={null}
#include "Rive/RiveViewModel.h"

// ViewModel is a URiveViewModel*, Texture is any UTexture*
ViewModel->SetImageValue(TEXT("MyImageProperty"), Texture);
```

`SetImageValue` accepts any `UTexture` and notifies the state machine that the bound property changed. The property name must match the image property as exposed on the ViewModel via data binding.

## Troubleshooting

* **Image doesn't update:** confirm the property name matches the ViewModel image property as exposed via data binding, and that your `RiveViewModel` is the one driving the artboard instance on screen.
* **Image looks wrong (dark fringes, incorrect alpha, oversaturation):** verify the source texture uses premultiplied alpha.
