📪Adding Time Trial Saves
Guide
How To Add Time Trial Saves Using TimeTrialSaveManager
Saving your time trial data is an important aspect to ensure that player progress persists across different scenes and game sessions. This means that when players close and relaunch your game, their personal best time will still be displayed instead of being reset.
To add persistent time trial data to your project, simply add the TimeTrialSaveManager component to an object in your scene. For convenience, it is recommended to add it to the same object where you added the TrackManager component.
Optionally, you can also specify a custom file name by setting it in the inspector of the TimeTrialSaveManager component.
NOTE: This save system is intended for testing/debugging purposes. It uses unencrypted JSON and lap times are easily modifiable by players.
How To Add Time Trial Data To Your Existing Save System:
TimeTrialSaveData is a serializable class in the TimeTrialSaveManager component that holds the relevant time trial data to be saved. It is used to convert time trial data to/from the JSON save file. This class can be modified to include any data you wish to save by adding your own fields to the class.
Otherwise, you can add time trial data to your own save system by accessing the public properties exposed in the LapTimeTrackingObject. See Accessing Time Trial Data sections for a full breakdown of time trial data that can be used.
Last updated