dzduole 4be683fb33 中文和声音头像OK 1 mese fa
..
Data 4be683fb33 中文和声音头像OK 1 mese fa
Events 4be683fb33 中文和声音头像OK 1 mese fa
ObsoleteAPI 4be683fb33 中文和声音头像OK 1 mese fa
Platform 4be683fb33 中文和声音头像OK 1 mese fa
Plugins 4be683fb33 中文和声音头像OK 1 mese fa
Resources 4be683fb33 中文和声音头像OK 1 mese fa
Runtime 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsService.cs 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsService.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsServiceInstance.Consent.cs 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsServiceInstance.Consent.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsServiceInstance.cs 4be683fb33 中文和声音头像OK 1 mese fa
AnalyticsServiceInstance.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
AssemblyInfo.cs 4be683fb33 中文和声音头像OK 1 mese fa
AssemblyInfo.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
Data.meta 4be683fb33 中文和声音头像OK 1 mese fa
Events.meta 4be683fb33 中文和声音头像OK 1 mese fa
IAnalyticsService.cs 4be683fb33 中文和声音头像OK 1 mese fa
IAnalyticsService.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
NewPlayerHelper.cs 4be683fb33 中文和声音头像OK 1 mese fa
NewPlayerHelper.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
ObsoleteAPI.meta 4be683fb33 中文和声音头像OK 1 mese fa
Platform.meta 4be683fb33 中文和声音头像OK 1 mese fa
Plugins.meta 4be683fb33 中文和声音头像OK 1 mese fa
README.md 4be683fb33 中文和声音头像OK 1 mese fa
README.md.meta 4be683fb33 中文和声音头像OK 1 mese fa
Resources.meta 4be683fb33 中文和声音头像OK 1 mese fa
Runtime.meta 4be683fb33 中文和声音头像OK 1 mese fa
SdkVersion.cs 4be683fb33 中文和声音头像OK 1 mese fa
SdkVersion.cs.meta 4be683fb33 中文和声音头像OK 1 mese fa
Unity.Services.Analytics.api 4be683fb33 中文和声音头像OK 1 mese fa
Unity.Services.Analytics.api.meta 4be683fb33 中文和声音头像OK 1 mese fa
Unity.Services.Analytics.asmdef 4be683fb33 中文和声音头像OK 1 mese fa
Unity.Services.Analytics.asmdef.meta 4be683fb33 中文和声音头像OK 1 mese fa

README.md

Runtime Documentation

This document only outlines some of the general runtime themes, this is not an in-depth guide.

General Design

The general structure is the public API sits on top, and orchestrates the interactions with the components below. Each component sits in its own directory.

     ---------------------------------------------
     |                                           |
     |            Analytics Runtime API          |
     |                                           |
     |------||-------------||------------||------|
     |              |              |             |
     |   Data Gen   |   Platform   |   Runtime   |
     |              |              |             |
     ---------------------------------------------
  • ./*.cs the public API, this brings together the elements below. Nothing under this should be public to the calling code.
  • ./Data/*.cs files handling the creating and storing of event data.
  • ./Platform/*.cs files that handle various platform information.
  • ./Runtime/*.cs files that contain runtime logic.

General Themes

Lazy Init

The user is free to push event data into the SDK even if it has not been initialized, this is to allow data to be recorded that might exist before initialization, or if the network is currently inactive.

The data will be stored in Data/Buffer.cs, and when initialized the heartbeat will start to flush data out of the buffer.

Event Data

The path to generate event data is as follows.

  • User calls an API entry point on Events.cs.
  • Standard events are generated in the Data/Generator.cs.
  • This information is pushed into Data/Buffer.cs.
  • Heartbeat then flushes out the data and sends to the backend.

Heartbeat

Periodically the heartbeat will flush data out of the buffer, but this is only happens after the SDK has been initialized.

  • Heartbeat will callback periodically.
  • If data is found in Data/Buffer.cs it will be serialized to JSON and sent