> For the complete documentation index, see [llms.txt](https://llando.gitbook.io/ttsystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://llando.gitbook.io/ttsystem/components-prefabs/timetrialsavemanager.md).

# TimeTrialSaveManager

Component

This component can be added to your project to ensure that player personal best lap times set by the [LapTimeTrackingObject](/ttsystem/components-prefabs/laptimetrackingobject.md) are persistent across game sessions. It is a singleton that provides saving/loading functionality by calling the `SaveDatatoJson` and `LoadDataFromJson` methods.&#x20;

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

<figure><img src="https://3733049803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKSO40gSd5fO9KWfOWErW%2Fuploads%2FMIzFmtGmYHRNKYY2ZBuV%2Fimage.png?alt=media&amp;token=4b478a21-e801-4f6a-8c9e-f3c118cb9640" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**CAUTION:** This save system is intended for testing/debugging purposes. It uses unencrypted JSON and lap times are easily modifiable by players.&#x20;
{% endhint %}

### 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 [Unity persistent data path](https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html) with the save file name field and JSON file ending appended to the path.
