llando
  • Overview
    • 💡Introduction
    • ✨Feature List
  • Guides
    • 📪Quick Setup
    • 📪Manual Setup
    • 📪Utilizing Time Trial Data Effectively
    • 📪Adding Time Trial UI
    • 📪Adding Time Trial Saves
    • 📪Accessing Time Trial Data
    • 📪Adding New Tracks
  • Components/Prefabs
    • 📪TrackManager
    • 📪LapTimeTrackingObject
    • 📪TrackPoint
    • 📪TimeTrialUIManager
    • 📪TimeTrialSaveManager
    • 📪TTSystem
  • Internal Classes
    • 📪Sector
    • 📪LapTimeTrackingEditor
Powered by GitBook
On this page
  • Save File Name
  • File Path
  1. Components/Prefabs

TimeTrialSaveManager

Component

Last updated 1 year ago

This component can be added to your project to ensure that player personal best lap times set by the are persistent across game sessions. It is a singleton that provides saving/loading functionality by calling the SaveDatatoJson and LoadDataFromJson methods.

This component makes use of a serializable TimeTrialSaveData class that is used for converting time trial data to/from the JSON save file.

CAUTION: This save system is intended for testing/debugging purposes. It uses unencrypted JSON and lap times are easily modifiable by players.

Save File Name

The save file name is a string that can be set in inspector to specify a custom file name to save and load the JSON save file. If no name is provided, a default name is given for the JSON file based on the name of the GameObject that this component is attached to.

File Path

String of the actual path where the file is saved/loaded from. The path used by default is the with the save file name field and JSON file ending appended to the path.

📪
Unity persistent data path
LapTimeTrackingObject