RealDocs

UActorComponent::MarkForNeededEndOfFrameRecreate

function Engine Since 4.9
#include "Components/ActorComponent.h"
Access: public

Description

Schedules a full render state recreation at end of frame, destroying and rebuilding the scene proxy. Use when changes require a new proxy rather than just an update to an existing one.

Caveats & Gotchas

  • Recreating the scene proxy is significantly more expensive than a transform or data update — use MarkRenderStateDirty() for property changes that allow an in-place update.
  • If the component is not currently in a world the recreation happens immediately, which can be surprising during construction.
  • Multiple calls in the same frame are coalesced into a single recreate at end of frame.

Signature

ENGINE_API void MarkForNeededEndOfFrameRecreate();

Return Type

void

Example

Schedule proxy recreation after a structural mesh change C++
void UMyProceduralComponent::RebuildGeometry()
{
    RegenerateMeshData();
    // A full proxy recreate is needed because geometry changed structurally
    MarkForNeededEndOfFrameRecreate();
}

Version History

Introduced in: 4.9

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.