docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
    • AddCollectorMenuAttribute
  • Unity.Simulation
    • AggregatedSample
    • AggregationEvent
    • ArrayCast
    • ArrayUtilities
    • AsyncRequest
    • AsyncRequest.ExecutionContext
    • AsyncRequest.Result
    • AsyncRequest.State
    • AsyncRequest<T>
    • BaseDataConsumer<T>
    • BaseDataConsumer<T>.Uploadable
    • Category
    • ChunkedStream
    • ChunkedUnityLog
    • CollectorBase
    • CollectorBase.ConsumeCollectorReport
    • CollectorElement
    • CollectorsBaseEditor
    • CollectorsList
    • Configuration
    • Configuration.SimulationConfiguration
    • ContentType
    • ContinuousEvents
    • ContinuousEvents.EventCollectionDelegate
    • ContinuousEvents.EventDispatchDelegate
    • CoreProfilerUtils
    • CounterEvent
    • CounterEventData
    • DXChunkedStream
    • DXChunkedUnityLog
    • DXFile
    • DXFormat
    • DXManager
    • DXTimeLogger
    • DataCapturePaths
    • DirectoryNameComponent
    • Dispatcher
    • EventBase
    • ExecUtility
    • ExitPlaymode
    • ExtensionNameComponent
    • FileNameComponent
    • FileProducer
    • Format
    • FrameCountCondition
    • FrameLimit
    • FrameNumberNameComponent
    • ICondition
    • IDataProduced
    • IGlobalProfilerDataDispatcher
    • IgnoreCollectorAttribute
    • LabelNameComponent
    • LambdaJob
    • LambdaJob.DelegateType
    • Log
    • Log.Level
    • Manager
    • Manager.NotificationDelegate
    • Manager.TickDelegate
    • NameComponent
    • NameGenerator
    • Options
    • PackageImportTests
    • PathUtility
    • PerfStatsManager
    • PlayerResolution
    • PlayerResolutionSettings
    • ProfilerManager
    • ProfilerProperties
    • ProfilerReport
    • ProfilerSamplingEvent
    • ReportingUtils
    • Sample
    • SampleProfilerCollector
    • SequenceNameComponent
    • SequencedPathName
    • SignedURLDataConsumer
    • SimSecondsCondition
    • SimulationProfiler
    • SimulationProfilerBase
    • SimulationProfilerEditor
    • TestUtility
    • ThreadUtility
    • TimeLimit
    • TimeLogger
    • TimeScale
    • TimeScaleEditor
    • TimeUtility
    • Timer
    • TimerSource
    • TimestampNameComponent
    • WallSecondsCondition

Class BaseDataConsumer<T>

Base class for data consumers to inherit from.

Inheritance
object
BaseDataConsumer<T>
SignedURLDataConsumer
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public abstract class BaseDataConsumer<T>
Type Parameters
Name Description
T

Constructors

BaseDataConsumer()

Declaration
protected BaseDataConsumer()

Fields

_keysToRemove

Declaration
protected List<string> _keysToRemove
Field Value
Type Description
List<string>

_uploadIsArtifact

Declaration
protected Dictionary<string, bool> _uploadIsArtifact
Field Value
Type Description
Dictionary<string, bool>

_uploadQueue

Declaration
protected Queue<string> _uploadQueue
Field Value
Type Description
Queue<string>

_uploadsInFlight

Declaration
protected Dictionary<string, BaseDataConsumer<T>.Uploadable> _uploadsInFlight
Field Value
Type Description
Dictionary<string, BaseDataConsumer<T>.Uploadable>

kMaxSimultaneousUploads

Declaration
protected const int kMaxSimultaneousUploads = 50
Field Value
Type Description
int

kMaxUploadRetryAttempts

Declaration
protected const int kMaxUploadRetryAttempts = 5
Field Value
Type Description
int

kUseConsoleLog

Declaration
protected const bool kUseConsoleLog = true
Field Value
Type Description
bool

Methods

Consume(object, bool, bool)

Consumes the object data.

Declaration
public void Consume(object data, bool synchronous = false, bool isArtifact = true)
Parameters
Type Name Description
object data

data to be consumed. Generally a string representing a path.

bool synchronous

If true, consumption will complete before returning.

bool isArtifact

A flag indicating if object being consumed is artifact or not.

ConsumptionStillInProgress()

Returns true if there is any consumption in progress.

Declaration
public bool ConsumptionStillInProgress()
Returns
Type Description
bool

LocalPathToObjectPath(string)

Implementation for LocalPathToObjectPath must be implemented in derived class.

Declaration
public virtual string LocalPathToObjectPath(string localPath)
Parameters
Type Name Description
string localPath
Returns
Type Description
string

Upload(string, string, bool)

Implementation for Upload must be implemented in derived class.

Declaration
public virtual bool Upload(string localPath, string objectPath, bool isArtifact)
Parameters
Type Name Description
string localPath
string objectPath
bool isArtifact
Returns
Type Description
bool

UploadAsync(Stream, string, bool)

Implementation for UploadAsync must be implemented in derived class.

Declaration
public virtual Task<T> UploadAsync(Stream source, string objectPath, bool isArtifact)
Parameters
Type Name Description
Stream source
string objectPath
bool isArtifact
Returns
Type Description
Task<T>

_ServiceName()

Declaration
protected string _ServiceName()
Returns
Type Description
string
In This Article
Back to top
Copyright © 2026 Unity Technologies — Trademarks and terms of use
  • Legal
  • Privacy Policy
  • Cookie Policy
  • Do Not Sell or Share My Personal Information