Building the scene

In order for us to save some time, we will load the HelloAR scene and modify it to meet our needs. Follow along the given steps:

  1. Open the HelloAR scene in the Assets/GoogleARCore/HelloARExample/Scenes folder by double-clicking on it.
  2. From the menu, select File | Save Scene as, save the scene in the new Assets/ARCore_Design/Scenes folder, and name it as Main.
Apart from the samples we worked with earlier, from now on, if we need to modify a file, we will copy it to a new appropriate folder, and rename it. This is a good practice to follow when modifying external assets. That way, when you update the asset with a new version, your changes will not be overwritten.
  1. From the menu, select Edit | Project Settings | Player
  2. At the Inspector window, click on the Android tab and edit the Package Name to com.Packt.ARCoreDesign, as shown in the following screen excerpt:
Editing the package name in the Player settings
  1. From the menu, select File | Build Settings.
  2. Click on the checkbox on the HelloAR scene to turn it off. Then, click on Add Open Scenes to add the new Main scene to the build. Ensure that the Android option is selected for the Platform, and confirm that everything is set, as shown in the following excerpt:
Setting the Build Settings
  1. Connect your device and then click on Build And Run. You will be prompted to save the APK. Enter the same name you used for the package (com.Packt.ARCoreDesign) and click on Save. This will kick off the build. A first build can take a while, so grab a beverage or take a quick break.

  2. Run the app on your device and confirm that everything runs as you expect it to. If anything fails, refer to Chapter 11, Performance Tips and Troubleshooting, for help.
As you work through the exercises in this chapter, try and build as often as possible. A build can quickly tell you if you have any major issues.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.184.75