AddVehicleControl

Description

Return a previously removed vehicle back to the Traffic System.

Declaration

public static void AddVehicleControl(int vehicleIndex)

Parameters

Name
Description

vehicleIndex

The index of the vehicle.

Example

using Gley.TrafficSystem;
using UnityEngine;

public class Test : MonoBehaviour
{
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Alpha0))
        {
            API.RemoveVehicleControl(0);
        }
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            API.AddVehicleControl(0);
        }
    }
}

Last updated