Fixing a defined size gameboard in one position

  • Issue category: Meshing/Gameboard usage
  • Device type & OS version: Android / iOS
  • Host machine & OS version: Windows 10 Home
  • Unity version: 2021.3.6f

Description of the issue:
Hi there, fairly new to the ARDK but fairly experienced with Unity

I’ve been trying to utilise the gameboard manager and classes to:

  • Scan around an area
  • Find an area of at least x size, x being a defined minimum usable value for a ‘play space’ in this project
  • Prune all other gameboard tiles except the tiles that fit into the minimum size as stated above
  • Save and access this newly pruned gameboard.

My issue is, what is the Gameboard? What objects does it create when scanning the environment and generating the green debug tiles? And how do I then access that?

Or am I thinking about this incorrectly?

Jacob Rowe

Hi Jacob,

The Gameboard is a grid of cells generated from meshes in the user’s environment to determine unoccupied areas. Under the hood, the Gameboard is creating a tree structure (the SpatialTree class) of squares (the Quad class). The individual objects that are created are meant to be abstracted away – as you’re expected to use the provided methods of IGameboard rather than the underlying objects to complete pathfinding or empty space querying operations. The green tiles you’re seeing are used for debugging purposes, and it’s just a mesh to visualize the surfaces and paths generated under the hood. I would highly recommend you check out the Gameboard Navigation tutorial for a good idea of how users are expected to interface with it. If you find that you need access to the underlying objects, you unfortunately will have to copy the code and unseal the individual classes or write code within the same namespace. Thankfully, the good news is that a lot of the functionality you’re looking for such as pruning, scanning, and finding areas of a predefined size is built-in.

I hope that helps!

Maverick L.