From the course: AR Development Techniques 02: Lighting and Physics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Resetting and reloading the ARSession

Resetting and reloading the ARSession

From the course: AR Development Techniques 02: Lighting and Physics

Start my 1-month free trial

Resetting and reloading the ARSession

- [Instructor] In this video, we are going to add the Refresh option in our app so that if the user decides to remove the objects from the surface and place them again, he can reload the whole scene. So let's do that. First let's create a new script. So go to Scripts folder, Right-click, Create C# script, and let's name this Refresh. Let's add this script inside the scene. So create a object, create empty and let's name this Refresh as well. And add the script as a component of this object. Now open the script. We are going to create a function public void Refresh scene. First let's import a Package, unityengine.scenemanagement To reload the scene, we have to call the load function. So let's do that. Scenemanager.loadscene. And the Scene that we want to reload or load is the Focus Circle Scene. So we have to type the exact name of the scene here, which is Focus Circle. Now save the script and go back to…

Contents