llando
  • Overview
    • 💡Introduction
    • ✨Feature List
  • Guides
    • 📪Quick Setup
    • 📪Manual Setup
    • 📪Utilizing Time Trial Data Effectively
    • 📪Adding Time Trial UI
    • 📪Adding Time Trial Saves
    • 📪Accessing Time Trial Data
    • 📪Adding New Tracks
  • Components/Prefabs
    • 📪TrackManager
    • 📪LapTimeTrackingObject
    • 📪TrackPoint
    • 📪TimeTrialUIManager
    • 📪TimeTrialSaveManager
    • 📪TTSystem
  • Internal Classes
    • 📪Sector
    • 📪LapTimeTrackingEditor
Powered by GitBook
On this page
  • TrackType
  • Track Points
  • Track Name
  1. Components/Prefabs

TrackManager

Component

Last updated 1 year ago

TrackManager is used to set and store properties according to the needs of your track. Each track in your project should have a TrackManager component to represent its layout.

The only properties that you MUST set on this component are the list of track points and the track type. The number of track points to add to your track is completely up to you, but should follow certain restrictions based on your track type.

TrackType

The TrackType is an enum that changes how lap start and finishes are calculated. There are two options for the track type:

  • Circular - You should use this track type if your start and finish lines are the same place. A good example of a circular track would be racing circuits which feature multiple laps.

NOTE: A circular track uses the first track point in the list as both the start and finish line but should have extra track points around the track to validate the lap and prevent cheating.

  • Linear - You should use this track type if your start and end finish line are different positions in your game. For example, a race that goes from point A to B (even if it has checkpoints in between) would suit the linear TrackType.

NOTE: A linear track should have a minimum of two track points in the list for the start and finish lines. You can also add many more in between to be used as checkpoints.

Track Points

Track Name

The name of the track that this component is managing. Defaults to the name of the GameObject that this component is attached to if no track name is provided.

This is a list of objects that any must pass through in order to register a valid lap and get a lap time. All points must be passed for the lap to be valid.

CAUTION: The track points list cannot be empty. It must be populated in order to start and stop a lap time. See the section above to see how to fill the list based on your type of track.

Refer to the for more details.

📪
TrackPoint
LapTimeTrackingObject
TrackPoint
TrackType