AActor::CheckDefaultSubobjectsInternal
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualoverride
Description
Internal integrity check that verifies all default subobjects (components created in the constructor) are properly registered. Called by the engine's asset verification system; rarely overridden.
Caveats & Gotchas
- • This is an engine-internal validation method. Overriding it without calling Super::CheckDefaultSubobjectsInternal() will suppress the base-class component integrity checks, which can mask component registration bugs.
- • Returning false from this method causes ensure() or check() failures in debug builds during cook or PIE startup. It is not a user-facing error path and should not be used to gate gameplay logic.
Signature
ENGINE_API virtual bool CheckDefaultSubobjectsInternal() const override; Return Type
bool Example
Override to add a custom subobject check C++
bool AMyActor::CheckDefaultSubobjectsInternal() const
{
bool bResult = Super::CheckDefaultSubobjectsInternal();
// Additional check: ensure our mandatory component was created
bResult = bResult && IsValid(MyRequiredComponent);
return bResult;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?