Train

Mono

How To Create

  1. Create a vehicle as well as Arcade vehicle.

  2. In the Traffic preset, open Hull prefab (all presets assigned in TrafficCarEntityPoolBakerRef, in this case HybridEntityMonoPhysics type).

    _images/train0-1.png
  3. Remove the ArcadeVehicleController component & reference to ArcadeVehicleController from the ScriptSwitcher component.

  4. Copy paste parent & unpack prefab for all wagons.

    _images/train0.png
  5. Add Train Runtime Authoring to the hull of the train.

    _images/train2.png
  6. Add Train Wagon Runtime Authoring & Train Wagon Mono Adapter components to the wagons of the train.

    _images/train3.png
  7. In the Train Runtime Authoring assign all wagons.

    _images/train4.png
  8. In the Traffic preset, open Entity prefab.

    _images/train5.png
  9. Add Traffic public components.

    _images/train6.png
  10. In the Car Capacity Authoring create entries for pedestrians.

  11. Copy paste parent & unpack prefab for all wagons for entity prefab.

    _images/train7.png
  12. Add Traffic Parent Wagon Authoring to parent & assign created wagons.

    _images/train8.png
  13. Create a Public route & select Forbidden/Everything Traffic Group Mask for each path of the route to prevent other vehicles from spawning.

Settings

Train settings for the built-in solution can be found in Configs/TrafficCarConfigs/RailConfig/Train Settings.

_images/trainSettings.png