RealDocs

AActor::ResetPropertiesForConstruction

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public

Description

Resets private actor properties to their defaults and re-seeds all FRandomStream members, so they will replay their random sequence from the beginning on the next construction.

Caveats & Gotchas

  • This is called automatically before re-running the construction script in the editor. Calling it manually in gameplay code will silently corrupt any randomness state your actor has accumulated at runtime.
  • FRandomStream members are always reset — there is no way to selectively exempt a stream. If you need persistent random state across construction reruns, store the seed externally and restore it in OnConstruction.

Signature

void ResetPropertiesForConstruction()

Return Type

void

Example

Called internally before RerunConstructionScripts C++
// Engine calls this automatically; illustrative only:
// ResetPropertiesForConstruction();
// RerunConstructionScripts();
// Manually triggering both in sequence is equivalent to what the editor does
// when you move an actor in the viewport.

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.