> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/mobile-pedestrian-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/mobile-pedestrian-system/complete-api/pedestriansystemoptions.md).

# PedestrianSystemOptions

### Description

A properties class that is used to initialize the Pedestrian System.

### Declaration

```csharp
public class PedestrianSystemOptions
```

### Members

| Name                      | Description                                                                                                                              |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **MinDistanceToAdd**      | Beyond the MinDistanceToAdd, pedestrians will spawn even without any obstructions or buildings blocking the view.                        |
| **DistanceToRemove**      | This value represents the approximate distance from the player at which a pedestrian is flagged to be removed from the scene.            |
| **UseWaypointPriority**   | Enables the usage of priority waypoints.                                                                                                 |
| **ActiveSquaresLevel**    | Represents the proximity from the player within which the adjacent cells will be active.                                                 |
| **InitialDensity**        | The number of pedestrians that will be active from the start. Should be <= than maxNumberOfPedestrians.                                  |
| **DisableWaypointsArea**  | Mark the waypoints in that area as disabled from the start. No vehicles will spawn there.                                                |
| **DefaultPathLength**     | The number of waypoints a pedestrian uses in navigation to determine the future direction.                                               |
| **SpawnWaypointSelector** | Default delegate to select a new waypoint. See [Spawn Waypoint Selector](/mobile-pedestrian-system/delegates/spawn-waypoint-selector.md) |
| **PedestrianBehaviours**  | Default pedestrian behaviours. See [Pedestrian Behaviours](/mobile-pedestrian-system/setup-guide/pedestrian-behaviours.md)               |

### Example

Assign all the properties inside the inspector, create a PedestrianSystemOptions object, and add it to the Initialize method.

If an option is not set, the default value will be used. Only set the properties you want to change.

```csharp
using Gley.PedestrianSystem;
using Gley.PedestrianSystem.Internal;
using UnityEngine;
public class Test : MonoBehaviour
{
    public PedestrianPool PedestrianPool;
    public Transform Player;
    public float MinDistanceToAdd;
    public float DistanceToRemove;
    public bool UseWaypointPriority;
    public int ActiveSquaresLevel;
    public int InitialDensity;
    public Area DisableWaypointsArea;
    public int DefaultPathLength;

    void Start()
    {
        PedestrianSystemOptions options = new PedestrianSystemOptions()
        {
            MinDistanceToAdd = MinDistanceToAdd,
            DistanceToRemove = DistanceToRemove,
            UseWaypointPriority = UseWaypointPriority,
            ActiveSquaresLevel = ActiveSquaresLevel,
            InitialDensity = InitialDensity,
            DefaultPathLength = DefaultPathLength,
            DisableWaypointsArea = DisableWaypointsArea,
            SpawnWaypointSelector = DefaultPedestrianDelegates.GetRandomSpawnWaypoint,
            PedestrianBehaviours = new DefaultBehaviours()
        };

        API.Initialize(Player, 20, PedestrianPool, options);
    }
}

```
