Manual Setup
Guide
Last updated
Guide
Last updated
The manual setup section is a step by step guide on how to get the Complete Time Trial System package up and running into your project quickly, but without the use of the pre-packaged prefab.
This guide assumes that you have already imported the Complete Time Trial System package into your project.
Add a component to an object in your scene. This component holds the data for your track and you must have one for every track in your project.
This is where you will set the track properties for the time trial system to use. E.g: Name, TrackType.
To keep things clean, it is recommended to add this component on a parent object and then have any for that track as children of this. That way, all information for a track is grouped nicely together.
Set the TrackType parameter on the TrackManager to either linear or circular based on the layout of your track. (See for a breakdown of each type of track).
(Optional) Set the track name field to the name of your track.
Drag a or depending on your type of project into the scene and position it at the start line of your track. Adjust the dimensions of its trigger to fit your track.
If using a linear track type, drag another into your scene to represent your finish line.
If using a circular track type, add several around your track to prevent cheating.
Using only one on a CIRCULAR track means that players can start a lap and reverse back to the start line to complete the lap.
Add checkpoints around the track by adding more to ensure times are valid and prevent cheating.
(Optional) Add as many more as you want around your track to create timed sectors around the track. (See )
CAUTION: Collider types of and must match for OnTriggerEnter/OnTriggerEnter2D callbacks to be registered which is required to calculate lap times.
Populate the list of track points on the with the objects that you added into your scene for that track. This list should be filled in the order in which you want these objects to be passed by your player. For example:
Start line = Index 0 in TrackPoints list
Second = Index 1 in TrackPoints list
Add a to the object(s) that you wish to use time trials for. These are any objects that you wish to be timed whilst going around a track.
The object(s) that you add this component to MUST have a collider and rigidbody attached and be of the same type as your objects (both 2D or both 3D).
DONE!
If everything is setup correctly, you will see time trial data being displayed as text in the inspector and being updated in real-time as you complete the lap.
Complete a lap with your . Time trial logic is now setup correctly and can be tested by navigating to your component while your game is running.