PostInitProperties and Constructor is being called 4 times on change of a Default Value

​Hello,

I have an Health (UActorComponent) attached to an actor in the blueprint. This Health Component has an exposed DefaultHealth Variable. I have implemented the PostInitProperties as shown below: Annotation 2020-07-24 180101.png

https://forums.unrealengine.com/core/image/gif;base64

And here’s the image of the Blueprint Components and Details Tab Annotation 2020-07-24 180101.png

![Annotation 2020-07-24 180101.png|415x180](upload://uUksibrHBo3CtzYTPtZSnP0K0mE.png)

Whenever I change the value of Default Health and Save the Constructor and PostInitProperties run 4 times, even though the Actor is not placed in the world nor will there be multiple instances of the Actor created during gameplay.

FYI: I am on UE 4.25.1

You should initialize variables in the constructor.

The problem with initializing in the constructor is that CurrentHealth value will not reflect the change in value of Default Health done in blueprint.
The Current Implementation is working fine functionality wise, but it gets called 4 times on change of the Default Health. Is this a bug?

1 Like

I have exactly the same question. Interestingly, on the first 2 calls, there are no values for blueprint properties… on the later 2 calls, the blueprint values are present. (float UPROPERTY, in this case)