Skip to main content

Class GameplayAnalyticsDataLog

Represents a log entry that stores gameplay analytics data, including timestamps, frame rate, and collected logs.

[Serializable]
public class GameplayAnalyticsDataLog : DataLog

Inheritance​

Remarks​

This class is used to store various gameplay statistics, such as the time since the game started, the in-game time, the average frame rate, and other logs collected from DataCollector instances. It is typically used to track and record gameplay data over time for later analysis or transmission to a server.

Constructors​

GameplayAnalyticsDataLog()​

Initializes a new instance of the GameplayAnalyticsDataLog class, setting default values.

public GameplayAnalyticsDataLog()

Remarks​

The constructor records the current timestamp (Unix time), the time since the scene started, and calculates the current frame rate.

GameplayAnalyticsDataLog(DataLog[])​

Initializes a new instance of the GameplayAnalyticsDataLog class with a specified collection of data logs.

public GameplayAnalyticsDataLog(DataLog[] logs)

Parameters​

NameTypeDescription
logsDataLog[]An array of DataLog objects that represent the collected data.

Remarks​

This constructor initializes the GameplayAnalyticsDataLog with a collection of logs along with default values for timestamp, game play time, and frame rate.

Fields​

fps​

The average frame rate (FPS) recorded during gameplay.

public int fps

Field Value​

int

Remarks​

This value gives an indication of the performance of the game, showing how smoothly the game is running. A higher FPS indicates better performance, while a lower FPS can point to potential performance issues.

game_play_time​

The in-game time (in seconds) that has passed since the start of the current scene.

public float game_play_time

Field Value​

float

Remarks​

This value tracks the elapsed time from when the scene began, providing context for the timing of gameplay events within that scene. The in-game time stop when the simulator pause.

logs​

An array of data logs collected from the subscribed DataCollector instances.

[SerializeReference]
public DataLog[] logs

Field Value​

DataLog[]

Remarks​

This array stores the data logs generated by the data collectors during gameplay. Each entry in the array represents a piece of collected data, which may include player actions, environmental changes, or other events relevant to the gameplay.

unix_timestamp​

The Unix timestamp (in milliseconds) representing the time since the game started.

public double unix_timestamp

Field Value​

double

Remarks​

This timestamp represents the exact moment the log entry was collected.