RealDocs

UActorComponent::IsRenderStateCreated

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

Description

Returns true if this component currently has a render state (scene proxy) created and registered with the renderer.

Caveats & Gotchas

  • Returns false before the component is registered or after it is unregistered, and also during certain editor operations that temporarily destroy and recreate the proxy. Guard render-thread interactions with this check.
  • A component can be visible (bVisible = true) yet have no render state if it doesn't require one (e.g. pure logic components). Not all components create a render state.

Signature

bool IsRenderStateCreated() const

Return Type

bool

Example

Guarding a render command with a state check C++
if (MyComponent->IsRenderStateCreated())
{
	// Safe to send data to the scene proxy
	MyComponent->MarkRenderDynamicDataDirty();
}

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.