# Editor Utility Widget (How to save changes) \[SOLVED\]

**URL:** <https://forums.unrealengine.com/t/editor-utility-widget-how-to-save-changes-solved/821338>\
**Category:** Programming & Scripting\
**Tags:** editor-utility-widge, Editor-Scripting, Editor-Utility, unreal-engine\
**Created:** [March 25, 2023, 2:06pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-save-changes-solved/821338 "2023-03-25T14:06:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loreseeker\_Games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loreseeker_games/32/698712_2.png) [@Loreseeker\_Games](https://forums.unrealengine.com/u/Loreseeker_Games)\
**Post date:** [March 25, 2023, 2:06pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-save-changes-solved/821338/1 "2023-03-25T14:06:48Z")

</div>

I’ve built a simple one-button widget that gets a reference to an actor in the editor level and randomizes a few of its variables. I can see the variable updating properly in the actor’s detail panel and also in the viewport. Good. BUT, these changes do NOT mark the level as “unsaved” and selecting “save all” from the menu and then reloading the level reverts all changes that the utility function made. The only way to save changes is to manually tweak something in the level after running the widget (which of course marks the level as needing to be saved). What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Loreseeker\_Games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loreseeker_games/32/698712_2.png) [@Loreseeker\_Games](https://forums.unrealengine.com/u/Loreseeker_Games)\
**Post date:** [March 25, 2023, 2:26pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-save-changes-solved/821338/2 "2023-03-25T14:26:51Z")

</div>

SOLVED. I had to use the “Set Editor Property” node instead of simply casting to the actor and modifying the variable.

For those like me who are just beginning to learn Editor Utilities, this is the setup I used.

 ![EditorWidget](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/e/32e2ee7286b522e6379a7d4a41d2600c5fdf369c.png)

---

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [December 20, 2023, 3:04pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-save-changes-solved/821338/3 "2023-12-20T15:04:19Z")

</div>

> instead of simply casting to the actor and modifying the variable

I’d like to extend this a bit: i’m still simply `GetAllActorsOfClass()`, then `Cast<>()`, then modify variables, but the function you provided was made into utility i’m calling on object after all modifications:

 ![изображение](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/6/e96f5f74ffb75a73ba495a2f237c70f18bdb5cae.png)

_note: `bCanBeDamaged` is a random AActor’s property i’m 100% not using_
