# Adding New Tracks

Tracks are defined by their TrackManager component. Every track must have its own [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)component to represent its layout.

### Adding A New Track In A New Scene:

* By default, the **Complete Time Trial System** package is setup to work with one track per Unity scene as it uses automatic assignment of references to prevent needing to manually assign components.
  * *This is done using FindObjectOfType\<TrackManager>() in Awake of LapTimeTrackingObject so fails with more than one TrackManager in the scene.*
* This has the benefit of being easy to use at the downside of flexibility. Should you prefer having multiple tracks per scene or a more flexible solution see the [**Adding New Tracks To The Same Scene**](#adding-a-new-track-to-the-same-scene) section below to see how to handle reference assignment manually instead.
* For adding time trials to a new track in a new scene, simply add a [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)component in that scene, and create the layout of your track as normal.

in [LapTimeTrackingObject.cs](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject):

```csharp
private TrackManager currentTrackManager; // Declaration

currentTrackManager = FindObjectOfType<TrackManager>(); // Assignment in Awake()

```

### Adding New Tracks To The Same Scene:

* To add multiple tracks in the same scene, simply modify the [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)reference in [LapTimeTrackingObject ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)to not use `FindObjectOfType` but instead your own method of choice for assignment.
* This can either be done manually by assigning the references in inspector or through a script that updates the [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)reference as you change track in game.
* This can also be used to provide much more flexibility for time trials in your projects and allows you to update the [TrackManager ](https://llando.gitbook.io/ttsystem/components-prefabs/trackmanager)reference for individual [LapTimeTrackingObjects ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)at any point during gameplay.&#x20;
* For example, you could have 2 races going on simultaneously in the same Unity scene each making use of time trials for their own [LapTimeTrackingObjects ](https://llando.gitbook.io/ttsystem/components-prefabs/laptimetrackingobject)on each track.

### 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)
