UActorComponent::IsRenderStateRecreating
#include "Components/ActorComponent.h"
Access: public
Description
Returns true while the render state is in the process of being destroyed and recreated due to a MarkRenderStateDirty call. Useful for components that want to preserve certain render state across the recreation.
Caveats & Gotchas
- • This flag is only set during re-creation triggered by MarkRenderStateDirty, NOT by RecreateRenderState_Concurrent or editor bulk-change operations. Don't rely on it as a general 'proxy is being rebuilt' sentinel.
- • The window during which this returns true is very brief — it's set just before DestroyRenderState_Concurrent and cleared after CreateRenderState_Concurrent completes.
Signature
bool IsRenderStateRecreating() const Return Type
bool Example
Preserving render state data across a dirty-driven recreation C++
void UMyComponent::DestroyRenderState_Concurrent()
{
if (IsRenderStateRecreating())
{
// Save data we want to hand back to the new proxy
SavedProxyData = CaptureProxyState();
}
Super::DestroyRenderState_Concurrent();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?