UObject::PostInitProperties
#include "UObject/Object.h"
Access: public
Specifiers: virtual
Description
Called after all UPROPERTY fields have been initialized to their default values (from the CDO or inline initializers). Override to perform setup that depends on the initial property values. Called before BeginPlay.
Signature
virtual void PostInitProperties() Return Type
void Caveats & Gotchas
- • Always call `Super::PostInitProperties()` when overriding.
- • Do not assume the object is in a world at this point — GetWorld() may return null.
- • For actors, prefer PostInitializeComponents() or BeginPlay() for world-dependent setup.
Example
Using PostInitProperties for derived config C++
void UMyDataAsset::PostInitProperties()
{
Super::PostInitProperties();
// Compute derived data from properties set in the asset editor
ComputedValue = BaseValue * Multiplier;
} See Also
Version History
Introduced in: 1.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?