Skip to content

InstantiateRandomTrees

janlucakaestle edited this page Feb 16, 2021 · 3 revisions

Instance of: NetworkController

Description

public void InstantiateRandomTrees()

This function creates trees randomly along the roads up to a certain distance.

Parameters

NumberOfTrees

Can be set in the Unity GUI in NetworkController Tab. Defines the number of trees to be spawned.

DistanceHorizon

Can be set in the Unity GUI in NetworkController Tab. Sets the maximum distance between a road segment and a tree spawning point.

Return Values

Spawns NumberOfTrees trees as GameObjects within the Trees GameObjectParent.

Examples

we could add some pictures here?

Clone this wiki locally