Unity 2018 Artificial Intelligence Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

Getting ready

Just like the previous representation, it's important to have several things in order before continuing:

  • Having the Edge class prepended to the Graph class in the same file
  • Defining the GetEdges function in the Graph class
  • Having the Vertex class
The vertex objects in the scene must have a collider component attached to them, as well as the Vertex tag assigned. It's recommended that they are unitary Sphere primitives.