Quick Setup
Guide
Last updated
Guide
Last updated
The quick setup guide covers how to get a time trial system working in your project with minimal setup. This section makes use of the pre-packaged prefabs to automatically handle a lot of the process.
It uses terminology that describes adding time trials to racing games, but the implementation steps are largely the same for all genres. E.g: platformers, speedrunning, puzzle games etc.
Should you want more customizability when integrating into your own project, refer to the guide.
This guide assumes that you have already imported the Complete Time Trial System package into your project.
(Optional) Set the track name field to the name of your track.
DONE!
Add a component to any object(s) that you wish to track lap times of. The object that you add this component to MUST have a collider and rigidbody attached.
Drag one of the two prefabs found in TTSystem > Prefabs into your scene.
If your uses 2D colliders, use TTSystem2D prefab.
If your uses 3D colliders, use TTSystem3D prefab.
CAUTION: Collider types of and TrackPointPrefabs must match for OnTriggerEnter/OnTriggerEnter2D callbacks to be registered which is required to calculate lap times.
Within the root prefab there are five inside the ExampleTrack parent GameObject, either 2D or 3D depending on the you selected. These are used as various points along your track - you can think of them as checkpoints.
Move the position of each GameObject to positions along your track and in the correct order you want them to be passed in.
Adjust the dimensions of any colliders if needs be so they fit your track.
In the ExampleTrack GameObject, navigate to the component and:
Set the TrackType parameter on the to either linear or circular based on the layout of your track. (See for a breakdown of each type of track).
Complete a lap with your . Time trial data will now be displayed on screen as part of the in the GameObject. This can be deleted/hidden if you do not want your time trial data on screen as all time trial data is still exposed on the component.
Navigate to the component while your game is running to see the time trial data in real-time without requiring any UI in your game. This is useful for debugging and is updated live as you complete the lap.
You can add/remove as you need, but ALWAYS update the TrackPoints list in the and populate the list in the order you want them to be passed as seen in ExampleTrack:
Make sure your are in order
Lock the inspector with the component visible
Select the for that track