First, we are going to add a field that stores a reference to the ARCoreComponent instance. This wraps up most of the interaction with ARCore. The ARCoreComponent is defined in the UrhoSharp.ARCore NuGet package that we installed at the beginning of the chapter.
Let's add some using statements and the arCore private field by going through the following steps:
- In the WhackABox.Droid project, open the Game.cs file.
- Add the arCore private field, and also make sure that you add the using statements marked in bold in the following code block:
using Com.Google.AR.Core;
using Urho;
using Urho.Droid;
namespace WhackABox.Droid
{
public class Game : WhackABox.Game
{
public Game(ApplicationOptions options) : base(options)
{
}
private ARCoreComponent arCore;
}
}
The using statements will allow us to resolve the types that we need in this file, and the arCore property will be a shorthand when we...