# How to reset to default a property of an actor in C++ 

**URL:** <https://forums.unrealengine.com/t/how-to-reset-to-default-a-property-of-an-actor-in-c/2512935>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [April 15, 2025, 9:00pm UTC](https://forums.unrealengine.com/t/how-to-reset-to-default-a-property-of-an-actor-in-c/2512935 "2025-04-15T21:00:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 15, 2025, 9:00pm UTC](https://forums.unrealengine.com/t/how-to-reset-to-default-a-property-of-an-actor-in-c/2512935/1 "2025-04-15T21:00:07Z")

</div>

Hello,

In the world, we have hundreds of instances of a blueprint actor placed. I would like to reset to default one property of all those instances. Just changing the value back to the default value is not enough because I need each instance to use the value specified in the blueprint.

I’m trying to find a way to do that in C++ with no success.

From a world, i’m getting all the concerned actors and i would like to call something like

`void SDetailSingleItemRow::OnResetToDefaultClicked() const`on a specific property.

Thank you.

---

<div class="post-metadata">

**Author:** ![VBarataBLab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VBarataBLab](https://forums.unrealengine.com/u/VBarataBLab)\
**Post date:** [April 16, 2025, 5:17am UTC](https://forums.unrealengine.com/t/how-to-reset-to-default-a-property-of-an-actor-in-c/2512935/2 "2025-04-16T05:17:06Z")

</div>

Hi, Pierre-Marc Berube,

Unfortunately, mimicking the behavior of most features found in the Details Panel and other Property Editors is usually not trivial. However, there is a quick-and-dirty shortcut you can use. You can basically “borrow” a lot of functionality from the Property Editor Module by creating a temporary “Single Property View” observing the property you are interested in. This does internally create temporary Slate Widgets just to throw them away, but it exposes a powerful API based on IPropertyHandle. Property Handles refer to nodes in a property tree that contains all the necessary information to handle the many property operations supported by Property Editor UIs. Here’s some code I just tested successfully:

`#include “MyEditorLibrary.h”

#include “Modules/ModuleManager.h”  
#include “PropertyEditorModule.h”  
#include “ISinglePropertyView.h”  
#include “PropertyHandle.h”

void UMyEditorLibrary::ResetPropertyToDefault(TArray\<AActor\*\> InActors, FName InPropertyName)  
{  
FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked(“PropertyEditor”);

for (AActor\* Actor : InActors)  
{  
// Get property handle  
TSharedPtr SinglePropertyView = PropertyEditorModule.CreateSingleProperty(Actor, InPropertyName, FSinglePropertyParams());  
TSharedPtr PropertyHandle = SinglePropertyView-\>GetPropertyHandle();

// Reset to default  
PropertyHandle-\>ResetToDefault();  
}  
}`Please let me know if this solution works for you or if you need any further assistance.

Best regards,

Vitor

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 17, 2025, 3:26pm UTC](https://forums.unrealengine.com/t/how-to-reset-to-default-a-property-of-an-actor-in-c/2512935/3 "2025-04-17T15:26:33Z")

</div>

it worked perfectly, thanks!
