# Manual Setup

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 [TTSystem ](https://llando.gitbook.io/ttsystem/components-prefabs/ttsystem)prefab.&#x20;

This guide assumes that you have already imported the **Complete Time Trial System** package into your project.

{% hint style="info" %}
**NOTE:** The minimum 3 components needed to quickly setup time trials are the [TrackManager](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager), [LapTimeTrackingObject ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)and the [TrackPoint ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)components.
{% endhint %}

* Add a [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)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.
  * &#x20;To keep things clean, it is recommended to add this component on a parent object and then have any [TrackPointPrefabs ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)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 [TrackManager](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager) for a breakdown of each type of track).
  * **(Optional)** Set the track name field to the name of your track.&#x20;
* Drag a [TrackPoint3DPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)or [TrackPoint2DPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)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 [TrackPointPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)into your scene to represent your finish line.
  * If using a circular track type, add several [TrackPointPrefabs ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)around your track to prevent cheating.&#x20;
    * *Using only one* [*TrackPointPrefab* ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)*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* [*TrackPointPrefabs* ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)*to ensure times are valid and prevent cheating.*
  * **(Optional)** Add as many more [TrackPointPrefabs ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)as you want around your track to create timed sectors around the track. (See [TrackPoint](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint))

{% hint style="warning" %}
**CAUTION:** Collider types of [LapTimeTrackingObject ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)and [TrackPointPrefabs ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)must match for OnTriggerEnter/OnTriggerEnter2D callbacks to be registered which is required to calculate lap times.
{% endhint %}

* Populate the list of track points on the [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)with the [TrackPointPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)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 [TrackPointPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)= Index 0 in TrackPoints list
  * Second [TrackPointPrefab ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)= Index 1 in TrackPoints list
* Add a [LapTimeTrackingObject ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)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* [*TrackPointPrefab* ](https://llando.gitbook.io/ttsystem/components-prefabs/trackpoint)*objects (both 2D or both 3D).*
* **DONE!**

Complete a lap with your [LapTimeTrackingObject](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject). Time trial logic is now setup correctly and can be tested by navigating to your [LapTimeTrackingObject ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)component while your game is running.&#x20;

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.

### What Next?

#### [How do I add time trial UI to my project?](https://llando.gitbook.io/ttsystem/guides/adding-time-trial-ui)

#### [How do I make time trial data save across game sessions?](https://llando.gitbook.io/ttsystem/guides/adding-time-trial-saves)

#### [How do I add time trials to multiple tracks?](https://llando.gitbook.io/ttsystem/guides/adding-new-tracks)
