Table of Contents

Class StreamingManager

Namespace
Stride.Streaming
Assembly
Stride.Rendering.dll

Performs content streaming.

public class StreamingManager : GameSystemBase, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable, IStreamingManager, ITexturesStreamingProvider
Inheritance
StreamingManager
Implements
Inherited Members
Extension Methods

Constructors

StreamingManager(IServiceRegistry)

Initializes a new instance of the StreamingManager class.

public StreamingManager(IServiceRegistry services)

Parameters

services IServiceRegistry

The servicies registry.

Remarks

The GameSystem expects the following services to be registered: IGame and IContentManager.

See Also

Fields

ManagerUpdatesInterval

The interval between StreamingManager updates.

public TimeSpan ManagerUpdatesInterval

Field Value

TimeSpan
See Also

MaxResourcesPerUpdate

The maximum number of resources updated per streaming manager tick. Used to balance performance/streaming speed.

public int MaxResourcesPerUpdate

Field Value

int
See Also

ResourceLiveTimeout

The StreamableResource live timeout. Resources that aren't used for a while are downscaled in quality.

public TimeSpan ResourceLiveTimeout

Field Value

TimeSpan
See Also

TargetedMemoryBudget

The targeted memory budget of the streaming system in MB. If the memory allocated by streaming system is under this budget it will not try to unload not visible resources.

public int TargetedMemoryBudget

Field Value

int
See Also

Properties

AllocatedMemory

Gets the memory currently allocated by streamable resources in MB.

public float AllocatedMemory { get; }

Property Value

float
See Also

AllocatedMemoryBytes

Gets the extact memory amount allocated by streamable resources in bytes.

public long AllocatedMemoryBytes { get; }

Property Value

long
See Also

ContentStreaming

Gets the content streaming service.

public ContentStreamingService ContentStreaming { get; }

Property Value

ContentStreamingService
See Also

Resources

List with all registered streamable resources.

public ICollection<StreamableResource> Resources { get; }

Property Value

ICollection<StreamableResource>
See Also

Methods

Destroy()

Disposes of object resources.

protected override void Destroy()
See Also

Get(Texture)

Gets the StreamingTexture corresponding to the given texture object.

public StreamingTexture Get(Texture obj)

Parameters

obj Texture

The texture object.

Returns

StreamingTexture

Streamable texture, or null if it can't be found.

See Also

Get<T>(object)

Gets the StreamableResource corresponding to the given resource object.

public T Get<T>(object obj) where T : StreamableResource

Parameters

obj object

The object.

Returns

T

Streamable resource, or null if it can't be found.

Type Parameters

T

The type of the streamable resource.

See Also

RegisterMemoryUsage(long)

Notify the streaming manager of the change memory used by the resources.

public void RegisterMemoryUsage(long memoryUsedChange)

Parameters

memoryUsedChange long

The change of memory used in bytes. This value can be positive of negative.

See Also

SetResourceStreamingOptions(Texture, StreamingOptions?)

Set the streaming options for the resources

public void SetResourceStreamingOptions(Texture texture, StreamingOptions? options = null)

Parameters

texture Texture

The texture.

options StreamingOptions?

The streaming options when streaming those resources

See Also

SetResourceStreamingOptions(ParameterCollection, StreamingOptions?)

Set the streaming options for the resources

public void SetResourceStreamingOptions(ParameterCollection parameters, StreamingOptions? options = null)

Parameters

parameters ParameterCollection

The material parameters.

options StreamingOptions?

The streaming options when streaming those resources

See Also

SetResourceStreamingOptions(RenderMesh, StreamingOptions?)

Set the streaming options for the resources

public void SetResourceStreamingOptions(RenderMesh renderMesh, StreamingOptions? options = null)

Parameters

renderMesh RenderMesh

The render mesh.

options StreamingOptions?

The streaming options when streaming those resources

See Also

SetStreamingSettings(StreamingSettings)

public void SetStreamingSettings(StreamingSettings streamingSettings)

Parameters

streamingSettings StreamingSettings
See Also

StreamResources(Texture, StreamingOptions?)

Called when texture is submitted to rendering. Registers referenced resources to stream them.

public void StreamResources(Texture texture, StreamingOptions? options = null)

Parameters

texture Texture

The texture.

options StreamingOptions?

The streaming options when streaming those resources

See Also

StreamResources(ParameterCollection, StreamingOptions?)

Called when material parameters are submitted to rendering. Registers referenced resources to stream them.

public void StreamResources(ParameterCollection parameters, StreamingOptions? options = null)

Parameters

parameters ParameterCollection

The material parameters.

options StreamingOptions?

The streaming options when streaming those resources

See Also

StreamResources(RenderMesh, StreamingOptions?)

Called when render mesh is submitted to rendering. Registers referenced resources to stream them.

public void StreamResources(RenderMesh renderMesh, StreamingOptions? options = null)

Parameters

renderMesh RenderMesh

The render mesh.

options StreamingOptions?

The streaming options when streaming those resources

See Also

Update(GameTime)

This method is called when this game component is updated.

public override void Update(GameTime gameTime)

Parameters

gameTime GameTime

The current timing.

See Also

See Also