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
  1. Guides

Manual Setup

Guide

Last updated 1 year ago

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.

NOTE: The minimum 3 components needed to quickly setup time trials are the , and the components.

  • 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.

What Next?

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.

📪
TTSystem
TrackManager
LapTimeTrackingObject
TrackPoint
TrackManager
TrackPointPrefabs
TrackManager
TrackPoint3DPrefab
TrackPoint2DPrefab
TrackPointPrefab
TrackPointPrefabs
TrackPointPrefab
TrackPointPrefabs
TrackPointPrefabs
TrackPoint
LapTimeTrackingObject
TrackPointPrefabs
TrackManager
TrackPointPrefab
TrackPointPrefab
TrackPointPrefab
LapTimeTrackingObject
TrackPointPrefab
LapTimeTrackingObject
LapTimeTrackingObject
How do I add time trial UI to my project?
How do I make time trial data save across game sessions?
How do I add time trials to multiple tracks?