Class DataStreamerSettingsBuilder
Provides methods to build a DataStreamerSettings instance.
Inherited Members
Namespace: Unity.Cloud.DataStreaming.Runtime
Assembly: Unity.Cloud.DataStreaming.Runtime.dll
Syntax
public sealed class DataStreamerSettingsBuilder
Remarks
Use CreateDefaultBuilder() to create an instance of this type.
Methods
Build()
Create the DataStreamerSettings to pass onto the IDataStreamer.
Declaration
public DataStreamerSettings Build()
Returns
Type | Description |
---|---|
DataStreamerSettings | The settings that represent the provided configurations. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The builder is not able to create valid settings. |
ConfigureDefaultResourceLimiter(Action<ResourceLimiterBuilder>)
Configures the builder to use the default resource limiter.
Declaration
public DataStreamerSettingsBuilder ConfigureDefaultResourceLimiter(Action<ResourceLimiterBuilder> configurator)
Parameters
Type | Name | Description |
---|---|---|
Action<ResourceLimiterBuilder> | configurator |
Returns
Type | Description |
---|---|
DataStreamerSettingsBuilder | An object to configure the resource limiter. |
CreateDefaultBuilder()
Creates the default builder that populates some default settings, which work for most use-cases. Use this static method to create the builder and customize your settings.
Declaration
public static DataStreamerSettingsBuilder CreateDefaultBuilder()
Returns
Type | Description |
---|---|
DataStreamerSettingsBuilder | The default DataStreamerSettingsBuilder. |
SetDefaultLayer(int)
Sets a default layer when a GameObject is created by IDataStreamer.
Declaration
public DataStreamerSettingsBuilder SetDefaultLayer(int layer)
Parameters
Type | Name | Description |
---|---|---|
int | layer | The default layer assigned. |
Returns
Type | Description |
---|---|
DataStreamerSettingsBuilder | this. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
SetMainThreadTimeLimit(TimeSpan)
Determines how much time the IDataStreamer can consume for each frame. Decrease this value to slow down streaming and reduce the impact that the streamer has on the frame rate. Increase this value to slow down the frame rate and cause the geometry to load faster.
Declaration
public DataStreamerSettingsBuilder SetMainThreadTimeLimit(TimeSpan maxTimePerCycle)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | maxTimePerCycle | The maximum time for each frame. |
Returns
Type | Description |
---|---|
DataStreamerSettingsBuilder | this. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
SetMaterialFactory(StreamingMaterialFactory)
Configures the builder to use a different Material Factory.
Declaration
public DataStreamerSettingsBuilder SetMaterialFactory(StreamingMaterialFactory materialFactory)
Parameters
Type | Name | Description |
---|---|---|
StreamingMaterialFactory | materialFactory | MaterialFactory to be used. |
Returns
Type | Description |
---|---|
DataStreamerSettingsBuilder | this. |