# How do i change a readonly property?

**URL:** <https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, editor, question, Blueprint, CPP\
**Created:** [February 9, 2023, 8:36pm UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576 "2023-02-09T20:36:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mergrast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mergrast](https://forums.unrealengine.com/u/Mergrast)\
**Post date:** [February 9, 2023, 8:36pm UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576/1 "2023-02-09T20:36:51Z")

</div>

I’m trying to do a blueprint to set multiple lightning configurations of my static mesh actors at once, i need to change cast static shadow, cast distance field indirect shadows, etc… Which are BlueprintReadOnly, i’ve tried to do this by python but even though the documentation saying it’s a Read/Write property i still get a read-only error, so how do i change this? Do i have to compile all my projects from source to be able to do this or is there some other way to do this?  
 ![forum01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/a/56a37efb39fbb287d48e1dd8bb6da5b03b60b870.png)

 ![forum02](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/5/aa5a7648626110d7ba8bf1eb516e3bbb51d4897d.png)  
 ![forum03](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/9/049c71c424c74bf48f26afbff6bcd2e6dce10a6b.png)

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [February 9, 2023, 10:38pm UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576/2 "2023-02-09T22:38:44Z")

</div>

> [@Mergrast](#):
>
> Do i have to compile all my projects from source to be able to do this or is there some other way to do this?

If it’s accessible in c++ make a c++ class to mange the property? The BlueprintReadWrite does not make it const in c++.

---

<div class="post-metadata">

**Author:** ![Mergrast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mergrast](https://forums.unrealengine.com/u/Mergrast)\
**Post date:** [February 10, 2023, 12:42am UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576/3 "2023-02-10T00:42:22Z")

</div>

So, can i make a class in c++ that, let’s say “supports” editor utilities and let’s say i make a “setInstanceCastStaticShadows(ustaticmeshcomponent inst, bool value)” function, can i call that function from the editor utility blueprint?

And i got myself thinking why wasn’t i able to edit that value from python? According to the documentation i should be able to do that.

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [February 10, 2023, 7:48pm UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576/4 "2023-02-10T19:48:05Z")

</div>

I believe so yes. I might be wrong but BlueprintReadOnly might affect python? I switched to 99% c++ long ago.

---

<div class="post-metadata">

**Author:** ![Broncoco52](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Broncoco52](https://forums.unrealengine.com/u/Broncoco52)\
**Post date:** [July 13, 2025, 8:36am UTC](https://forums.unrealengine.com/t/how-do-i-change-a-readonly-property/767576/5 "2025-07-13T08:36:55Z")

</div>

try this:

`meshComponent.set_editor_property('cast_static_shadow', False)`
