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
Requirements for Component classes: #
- The class must inherit
Component. - The class must include the
@SerializedName(val name: String)annotation that provides a provides a unique string paramater. We recommend you use a UUID or UTC timestamp in EPOC seconds. - Each property of the class must have the
@FieldNumberannotation with a unique integer.
Supported Data Types #
String- Numeric Types:
Int|UInt|Byte|UByte|Short|UShort|Long|ULong|Boolean|Float|Double UUIDMapandMutableMap. Keys must beInt|StringListandMutableList.
Data types are restricted because Pragma Engine generates a protobuf definition for each Component.