RealDocs

AActor::PrestreamTextures

function Engine Blueprint Since unknown
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualUFUNCTION

Description

Forces all mesh components on this actor to prestream their textures at full resolution for the specified duration. Useful before cinematics or cutscenes to eliminate pop-in.

Caveats & Gotchas

  • Only iterates over UMeshComponent subclasses (static meshes, skeletal meshes); any custom components that manage their own streaming will not be affected unless they override this virtual.
  • CinematicTextureGroups is a bitfield matching UTexture's LODGroup — pass 0 for all groups to use default mips, or specific bits to force cinematic quality on selected groups. Incorrect bits silently have no effect.
  • Calling with bEnableStreaming=false cancels the forced-resident request, but the streaming system may take a frame or two to actually evict mips if memory pressure requires it.

Signature

UFUNCTION(BlueprintCallable, Category = "Rendering")
ENGINE_API virtual void PrestreamTextures( float Seconds, bool bEnableStreaming, int32 CinematicTextureGroups = 0 )

Parameters

Name Type Description Default
Seconds float Number of seconds to force all mip levels to be resident.
bEnableStreaming bool True to start streaming in textures; false to stop forcing them resident.
CinematicTextureGroups int32 Bitfield indicating which texture groups should use extra high-resolution cinematic mips. 0

Return Type

void

Example

Force textures resident before a cutscene C++
void AMyDirector::PrepareCutscene(AActor* FocusActor)
{
    if (FocusActor)
    {
        // Force all mips resident for 5 seconds; no cinematic groups override
        FocusActor->PrestreamTextures(5.f, true, 0);
    }
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.