Live Data Tasks #
Player Data lets you define the classes that Pragma Engine stores in the Player Data databases.
Define a Component #
Pragam Engine provides the Component
interface to identify classes that contain the data you want to persist.
Example of a Component that stores a string
@SerializedName("88a03c44-4790-4002-97bc-39323e590344")
data class ExampleStringData(
@FieldNumber(1) var stringData: String
): Component
Steps and Requirements for Component classes:
- The class must inherit
Component
- The class must include the
@SerializedName(val name: String)
annotation.- Provide a unique string paramater. We recommend you use a UUID or UTC timestamp in EPOC seconds.
- Each property of the class requires the
@FieldNumber
annotation with an unique integer.
Supported Data Types
String
- Numeric Types:
Int
|UInt
|Byte
|UByte
|Short
|UShort
|Long
|ULong
|Boolean
|Float
|Double
UUID
Map
andMutableMap
.- Keys must be
Int
|String
- Keys must be
List
andMutableList
.
Data types are restricted because Pragma Engine generates a protobuf definition for each Component
.