# UPROPERTY's Reset on Compile

**URL:** <https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [April 30, 2020, 7:26pm UTC](https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568 "2020-04-30T19:26:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueSpud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueSpud](https://forums.unrealengine.com/u/BlueSpud)\
**Post date:** [April 30, 2020, 7:26pm UTC](https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568/1 "2020-04-30T19:26:06Z")

</div>

Hey, I have a subclass of USceneComponent with a few UPROPERTY’s whose defaults are meant to be set in the properties panel of a blueprint. Every time I make a change to the code of the component – including when there are no changes in the header – the values set in blueprint reset to the default values.

Here is a minimal example of a component that has the issue for me:

```auto

    
UCLASS( ClassGroup=(Test), meta=(BlueprintSpawnableComponent) )    
class GAME_API UTestComponent : public USceneComponent {            

GENERATED_UCLASS_BODY()          

public:              

    UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = Test)              
    TArray<float> TestArray;  

}

```

The problem is persisting both when I close the editor and compile, when I use hot reload compiling through my IDE and when using hot load when compiling from the editor. I’m using 4.24.3

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 1, 2020, 8:41am UTC](https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568/2 "2020-05-01T08:41:01Z")

</div>

Hot Reload has been broken since forever, it’s not worth trying to use it. Almost everyone will tell you to enable and use Live Coding instead.

You can’t make header or constructor changes without restarting the editor completely.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17cf2648](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17cf2648](https://forums.unrealengine.com/u/anonymous_user_17cf2648)\
**Post date:** [May 1, 2020, 3:32pm UTC](https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568/3 "2020-05-01T15:32:58Z")

</div>

Hey I’m new to unreal and all this I would like to know how coding really works?

---

<div class="post-metadata">

**Author:** ![BlueSpud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueSpud](https://forums.unrealengine.com/u/BlueSpud)\
**Post date:** [May 2, 2020, 7:03am UTC](https://forums.unrealengine.com/t/upropertys-reset-on-compile/142568/4 "2020-05-02T07:03:11Z")

</div>

> [@Jambax](#):
>
> Hot Reload has been broken since forever, it’s not worth trying to use it. Almost everyone will tell you to enable and use Live Coding instead.
> 
> You can’t make header or constructor changes without restarting the editor completely.

Like I said in the OP, the problem is still happening even if I’m not using hot reloading. Also the problem is happening even just editing method implementations, not changing anything in the header or constructor.
