RealDocs

AActor::MarkComponentsRenderStateDirty

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

Description

Flags all components' render state as dirty, causing them to be re-submitted to the render thread on the next frame. Use this instead of ReregisterAllComponents when only visual state needs updating.

Caveats & Gotchas

  • Much cheaper than ReregisterAllComponents because it does not tear down and rebuild component registrations — it only invalidates cached render data.
  • This does not affect physics state; if you also need physics proxies rebuilt you must do so separately.

Signature

ENGINE_API void MarkComponentsRenderStateDirty();

Return Type

void

Example

Force render refresh after a material change C++
// After changing a material parameter at runtime
UMaterialInstanceDynamic* MID = UKismetMaterialLibrary::CreateDynamicMaterialInstance(this, BaseMaterial);
MeshComponent->SetMaterial(0, MID);
MarkComponentsRenderStateDirty(); // ensure render thread picks up the change

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.