# Cannot pass a read-only variable to a reference parameter Brush

**URL:** <https://forums.unrealengine.com/t/cannot-pass-a-read-only-variable-to-a-reference-parameter-brush/732476>\
**Category:** FX\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [December 20, 2022, 12:07pm UTC](https://forums.unrealengine.com/t/cannot-pass-a-read-only-variable-to-a-reference-parameter-brush/732476 "2022-12-20T12:07:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 20, 2022, 12:07pm UTC](https://forums.unrealengine.com/t/cannot-pass-a-read-only-variable-to-a-reference-parameter-brush/732476/1 "2022-12-20T12:07:21Z")

</div>

I want to change the value of a parameter of a material.  
The material is applied to a border in the HUD.

I am trying to get a dynamic instance to that material but I get this error.

> Cannot pass a read-only variable to a reference parameter Brush

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/6/9f6c24171435d8f87768877c02bd8665620d04dc.png)

 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/6/0b69d2cb20a195d6a8f9c1c79357c976a056e0a1.png)

How to do it?  
Thank you so much!!

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 20, 2022, 12:51pm UTC](https://forums.unrealengine.com/t/cannot-pass-a-read-only-variable-to-a-reference-parameter-brush/732476/2 "2022-12-20T12:51:17Z")

</div>

This works:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/d/eadf8e45571f235d7dfcf82541dc2df7f934383f.jpeg "UMG Dynamic Material") ](https://www.youtube.com/watch?v=w1JjoBs0LcE)
