Interface IDataStreamer
Provides an abstraction of the streaming behavior, which you can use for testing and mocking, and is the main interface for the Data Streaming package. Use the static Create() method to get the default implementation.
Namespace: Unity.Cloud.DataStreaming.Runtime
Assembly: solution.dll
Syntax
public interface IDataStreamer
Properties
StageCreated
Event-like object to know when the stage is created.
Declaration
IObservableEvent<IStage> StageCreated { get; }
Property Value
Type | Description |
---|---|
IObservableEvent<IStage> |
Remarks
Use the IStage instance to access features related to the stage.
StageDestroyed
Event-like object to know when the stage is destroyed.
Declaration
IObservableEvent StageDestroyed { get; }
Property Value
Type | Description |
---|---|
IObservableEvent |
Remarks
Calling any methods on the previously received IStage instance through StageCreated is invalid after this event triggers.
Methods
Close()
Stops the streaming process and cleans up GameObjects that the streamer dynamically generates. This method does nothing if Open(DataStreamerSettings) has not been invoked.
Declaration
void Close()
Create()
Creates an instance of the default implementation of IDataStreamer.
Declaration
public static IDataStreamer Create()
Returns
Type | Description |
---|---|
IDataStreamer | An instance of IDataStreamer. |
Open(DataStreamerSettings)
Starts the streaming process with the given DataStreamerSettings.
Declaration
IStage Open(DataStreamerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
DataStreamerSettings | settings | The settings used to open the streamer. Use DataStreamerSettingsBuilder to create an instance of this type. |
Returns
Type | Description |
---|---|
IStage |
Exceptions
Type | Condition |
---|---|
ArgumentException | The |
InvalidOperationException | The streamer is already open. |