Texture render target not updating when game paused?

I’m using a SceneCaptureComponent2D inside an actor blueprint to render a scene to a render target (a texture). But I am seeing that when the game is paused (GetWorld->IsPaused()==true), it doesn’t update the render target.

How do I fix this, or work around it?

I’ve set the actor blueprint to update when paused (PrimaryActorTick.bTickEvenWhenPaused = true; in its constructor), and I’ve also set “AutoActivate” on the SceneCaptureComponent2D to true.

Hey -

The SceneCapture Component 2D or Cube does not directly run on tick, but you can make it run on tick and have it maintain updating through a Pause with this setup:

The one think you will want to do in the Components is make sure that your camera is set to NOT update every frame which will force the camera to update only when moved.

Thank You

Eric Ketchum

1 Like

Thanks, Eric – that fixed it! :slight_smile:

A bit awkward having to put it into an infinite MoveComponentTo loop, but hey … if it works, I’ll take it!

@EricKetchum, can you give some more details on how this blueprint is set up?

I tried to turn my camera that is looking at stuff to render, and isn’t working when I tried to do your setup.

I feel like there is half the blueprint missing for what I need? My render target updates fine and looks good as long as the world is not paused, but stops updating once I do pause the game.

Hello -

So the Blueprint above is a Camera Actor itself. I made a BP Actor class and added a Scene Capture 2D as the sole component. Once that is done, the important part of this is to set the Scene Capture 2D to not update on Tick via the Component Details and instead you will be using the logic listed above in Event Tick to run the same update functionality and finally and most importantly you are setting the actor to calculate Tick even when the Game is Paused on Event Begin Play.

Hopefully that clarifies what you are asking about -

Eric Ketchum