UStreamableRenderAsset

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/StreamableRenderAsset.h

Include

#include "Engine/StreamableRenderAsset.h"

Syntax

class UStreamableRenderAsset : public UObject

Variables

Name Description

Public variable

uint8: 1

 

bForceMiplevelsToBeResident

Override whether to fully stream even if texture hasn't been rendered.

Public variable

uint8: 1

 

bGlobalForceMipLevelsToBeResident

Global and serialized version of ForceMiplevelsToBeResident.

Public variable

uint8: 1

 

bHasStreamingUpdatePending

Whether some mips might be streamed soon.

Public variable

uint8: 1

 

bIgnoreStreamingMipBias

When forced fully resident, ignores the streaming mip bias used to accommodate memory constraints.

Protected variable

uint8: 1

 

bUseCinematicMipLevels

Whether to use the extra cinematic quality mip-levels, when we're forcing mip-levels to be resident.

Protected variable

int32

 

CachedCombinedLODBias

Cached combined group and texture LOD bias to use.

Protected variable

FStreamableRend...

 

CachedSRRState

Gamethread coherent state of the resource.

Protected variable

double

 

ForceMipLevelsToBeResidentTimestamp

WorldSettings timestamp that tells the streamer to force all miplevels to be resident up until that time.

Protected variable

TArray< FLODStr...

 

MipChangeCallbacks

Public variable

uint8: 1

 

NeverStream

Public variable

int32

 

NumCinematicMipLevels

Number of mip-levels to use for cinematic quality.

Protected variable

TRefCountPtr< c...

 

PendingUpdate

An update structure used to handle streaming strategy.

Protected variable

int32

 

StreamingIndex

FStreamingRenderAsset index used by the texture streaming system.

Constructors

Name Description

Public function

UStreamableRenderAsset

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual Const

int32

 

CalcCumulativeLODSize

(
    int32 NumLODs
)

Public function

void

 

CancelPendingStreamingRequest()

Tries to cancel a pending LOD change request.

Public function Virtual Const

bool

 

DoesMipDataExist

(
    const int32 MipIndex
)

Public function Const

int32

 

GetCachedLODBias()

Returns the cached combined LOD bias based on texture LOD group and LOD bias.

Public function Virtual Const

float

 

GetLastRenderTimeForStreaming()

Get the per-asset last render time.

Public function Virtual Const

int32

 

GetLODGroupForStreaming()

Get an integer representation of the LOD group

Public function Virtual Const

FIoFilenameH...

 

GetMipIoFilenameHash

(
    const int32 MipIndex
)

Public function Virtual Const

EStreamableR...

 

GetRenderAssetType()

Public function Const

const FStrea...

 

GetStreamableResourceState()

Return the streaming state of the render resources.

Public function Const

int32

 

GetStreamingIndex()

Public function Const

bool

 

HasPendingInitOrStreaming

(
    bool bWaitForLODTransition
)

Whether a stream in / out request is pending.

Protected function Virtual Const

bool

 

HasPendingLODTransition()

Protected function Virtual Const

bool

 

HasPendingRenderResourceInitialization()

Also returns false if the render resource is non existent, to prevent stalling on an event that will never complete.

Public function Virtual

void

 

InvalidateLastRenderTimeForStreaming()

Invalidates per-asset last render time.

Public function

bool

 

IsFullyStreamedIn()

Whether all miplevels of this texture have been fully streamed in, LOD settings permitting.

Public function Const

bool

 

IsPendingStreamingRequestLocked()

Whether there is a pending update and it is locked within an update step.

Public function Const

bool

 

IsStreamable()

Whether the current asset render resource is streamable from a gamethread timeline.

Public function

void

 

LinkStreaming()

Links texture to the texture streaming manager.

Public function

void

 

RegisterMipLevelChangeCallback

(
    UPrimitiveComponent* Component,
    int32 LODIdx,
    float TimeoutSecs,
    bool bOnStreamIn,
    FLODStreamingCallback&& Callback
)

Register a callback to get notified when a certain mip or LOD is resident or evicted.

Public function

void

 

RemoveAllMipLevelChangeCallbacks()

Not thread safe and must be called on GT timeline but not necessarily on GT (e.g. ParallelFor called from GT).

Public function

void

 

RemoveMipLevelChangeCallback

(
    UPrimitiveComponent* Component
)

Remove mip level change callbacks registered by a component.

Public function Const

bool

 

RenderResourceSupportsStreaming()

Whether the current asset render resource is streamable from a gamethread timeline.

Public function

void

 

SetForceMipLevelsToBeResident

(
    float Seconds,
    int32 CinematicLODGroupMask
)

Tells the streaming system that it should force all mip-levels to be resident for a number of seconds.

Public function Virtual Const

bool

 

ShouldMipLevelsBeForcedResident()

Returns whether miplevels should be forced resident.

Public function Virtual

bool

 

StreamIn

(
    int32 NewMipCount,
    bool bHighPrio
)

Loads mips from disk to memory. Only usable if the asset is streamable.

Public function Virtual

bool

 

StreamOut

(
    int32 NewMipCount
)

Unload some mips from memory. Only usable if the asset is streamable.

Public function

void

 

TickMipLevelChangeCallbacks

Invoke registered mip level change callbacks.

Public function

void

 

TickStreaming

(
    bool bSendCompletionEvents,
    TArray< UStreamableRenderAsset*...
)

Public function

void

 

UnlinkStreaming()

Unlinks texture from the texture streaming manager.

Public function

void

 

WaitForPendingInitOrStreaming

(
    bool bWaitForLODTransition,
    bool bSendCompletionEvents
)

Wait for any pending operation (like InitResource and Streaming) to complete.

Public function

void

 

WaitForStreaming

(
    bool bWaitForLODTransition,
    bool bSendCompletionEvents
)

Wait for any pending operation and make sure that the asset streamer has performed requested ops on this asset.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Classes

Name

Description

Protected struct

FLODStreamingCallbackPayload

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss