Demo City

Getting Started

  1. Initial scene example:

    _images/ExampleScene.png
  2. Create a SpawnPoint object (any transform) in the scene where you want the player to spawn & assign it to PlayerSpawner.

    _images/PlayerSpawner.png

    Scene hierarchy example.

    _images/PlayerSpawner1.png

    Component example.

  3. In the PlayerSpawner select which type of player you want to spawn first, NPC or Car.

    _images/PlayerSpawner2.png
  4. Select the Player agent type in the General Settings to spawn the Player or the Free fly camera.

    _images/CitySettingsInitializer.png
  5. If you want to add your own player, read here, otherwise you can use the temporary built-in Player Character & Player car [optional step].

  6. Set desired local position of Cull point & Culling distances at which road objects, traffic, pedestrians etc. will be activated.

  7. By default, the cull point is the child in the Main Camera City, but if you want to use your own player & camera: [optional step]

    _images/CityCreation1.png
    • Select CitySettingsInitializer on the scene:

      _images/CityCreation2.png
    • Set the Player controller type to Custom in the General Settings config.

      _images/CityCreation3.png
    • Disable the Main Camera City.

      _images/CityCreation4.png
    • Create a new gameobject, add a CullPointRuntimeAuthoring component & add this object by child to your camera (set local position to zero) or add it to the scene not too far from the roads, if the camera is not yet created.

    _images/Tutorial6.gif

    New cull point example.

  8. The next step is to configure Scene