December 2018
Intermediate to advanced
416 pages
10h 30m
English
We need a method to quickly find nodes. Both ARKit and ARCore keep an internal track of their planes, and to map those internal representations of planes to our PlaneNode, we have to assign a custom ID to a plane when it's created. This will be done in the platform-specific code, but we can still write the function to query the scene for PlaneNode.
The PlaneNode is a string, since ARKit defines the plane ID in a form that resembles a Global Unique Identifier (GUID). A GUID is a structured sequence of hexadecimal numbers that can be represented in a string format, as shown in the following code:
private PlaneNode FindNodeByPlaneId(string planeId) => scene.Children.OfType<PlaneNode>() .FirstOrDefault(e => e.PlaneId == planeId); ...
Read now
Unlock full access