O'Reilly logo

Learn ARCore - Fundamentals of Google ARCore by Micheal Lanham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the SceneSwitcher

Let's add another script/component that will just activate our SceneController. Open up the editor and complete the following:

  1. Create a new C# script called SceneSwitcher, and replace all the pre-generated code with the following:
using UnityEngine;namespace Packt.HoloCore{  public class SceneSwitcher : MonoBehaviour {    }}
  1. Create the following property inside the class:
public Camera mapCamera;
  1. This is a placeholder for the mapCamera, the camera being used to render the Wrld map. We need this when the map is not being controlled by the camera, which is the case when the user is in AR / MR.
  2. Then, create the following method:
public void SwitchScenes(string sceneName){ SceneController.Instance.LoadScene(sceneName, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required