# How to save a widget blueprint to .uasset file in c++

**URL:** <https://forums.unrealengine.com/t/how-to-save-a-widget-blueprint-to-uasset-file-in-c/2136655>\
**Category:** UI\
**Tags:** unreal-engine, question\
**Created:** [November 20, 2024, 3:16am UTC](https://forums.unrealengine.com/t/how-to-save-a-widget-blueprint-to-uasset-file-in-c/2136655 "2024-11-20T03:16:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_8a6e669d61a91583a80d9fa10022b7cc17aa8521a0792ce8809ea5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_8a6e669d61a91583a80d9fa10022b7cc17aa8521a0792ce8809ea5](https://forums.unrealengine.com/u/user_8a6e669d61a91583a80d9fa10022b7cc17aa8521a0792ce8809ea5)\
**Post date:** [November 20, 2024, 3:16am UTC](https://forums.unrealengine.com/t/how-to-save-a-widget-blueprint-to-uasset-file-in-c/2136655/1 "2024-11-20T03:16:30Z")

</div>

Hey guys, I’ve loaded and modified a widget in c++(add some buttons, for example). Now i want to save this widget to disk in the editor environment. Can someone tell me how to do this?

---

<div class="post-metadata">

**Author:** ![user\_473504a1534af3b6e5e5991bf13750e943fdd811b6fe7fb2bb234a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_473504a1534af3b6e5e5991bf13750e943fdd811b6fe7fb2bb234a](https://forums.unrealengine.com/u/user_473504a1534af3b6e5e5991bf13750e943fdd811b6fe7fb2bb234a)\
**Post date:** [November 20, 2024, 3:30am UTC](https://forums.unrealengine.com/t/how-to-save-a-widget-blueprint-to-uasset-file-in-c/2136655/2 "2024-11-20T03:30:04Z")

</div>

I’ve also tried saving some runtime data, such as actors, but I wasn’t successful. Using `SaveGameToSlot` only allows saving `UPROPERTY` variables. Therefore, my current approach is to create a descriptive structure for the objects I want to save, store that structure using `SaveGameToSlot`, and then use the structure to restore the actor when loading. If you directly try to save an actor or `UObject`, it could lead to a series of issues like memory alignment or context problems. Feedback is welcome!
