class GameboardManager (Niantic.ARDK.Extensions.Gameboard.GameboardManager)

Overview

This helper can be placed in a scene to easily create and update a Gameboard. Other scripts can subscribe to GameboardFactory.OnGameboardCreated to access the created Gameboard. It will trigger regular scans of the environment in front of the ARCamera based on the scan settings. The Gameboard will add and remove tiles based on the Gameboard settings. Scanning can be enabled/disabled by calling EnableFeatures() / DisableFeatures(). Gameboard debug visibility can be toggled on and off. This includes Gameboard tiles, paths, and gizmos of the scanning rays. More…

class GameboardManager: Niantic.ARDK.Extensions.UnityLifecycleDriver {
public:
    // fields

    bool _visualise = true;

    // properties

    Camera ArCamera;
    Camera Camera;
    float FlatFloorTolerance;
    IGameboard Gameboard;
    LayerMask LayerMask;
    float MaxSlope;
    float ScanInterval;
    float ScanRange;
    float StepHeight;
    float TileSize;
    bool Visualise;

    // methods

    void CreateNewGameboard();
    void DestroyGameboard();
    void SetVisualisationActive(bool active);
};

Inherited Members

public:
    // properties

    bool AreFeaturesEnabled;
    bool CanInitialize;
    bool Initialized;

    // methods

    void Deinitialize();
    void DisableFeatures();
    void EnableFeatures();
    void Initialize();

Detailed Documentation

This helper can be placed in a scene to easily create and update a Gameboard. Other scripts can subscribe to GameboardFactory.OnGameboardCreated to access the created Gameboard. It will trigger regular scans of the environment in front of the ARCamera based on the scan settings. The Gameboard will add and remove tiles based on the Gameboard settings. Scanning can be enabled/disabled by calling EnableFeatures() / DisableFeatures(). Gameboard debug visibility can be toggled on and off. This includes Gameboard tiles, paths, and gizmos of the scanning rays.

Properties

float FlatFloorTolerance

The value specifying the amount of tolerance for meshing noise allowed to consider the floor as flat.

float MaxSlope

The value specifying the maximum slope angle (degrees) an area can have and still be considered flat.

float StepHeight

The value specifying the maximum amount two cells can differ in elevation and still be considered on the same plane.

float TileSize

The value specifying the size (meters) of a grid tile containing one node.

bool Visualise

The value specifying whether to render the debug Gameboard visualization or not.

Methods

void CreateNewGameboard()

Creates a new Gameboard using the GameboardFactory.

void DestroyGameboard()

Destroys the existing Gameboard.

void SetVisualisationActive(bool active)

Activate/deactivate visualisation of scan raycasts, Gameboard tiles and paths.