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
From the course: AR Development Techniques 02: Lighting and Physics
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Plane detection overview1m
-
(Locked)
ARSession and ARSessionOrigin2m 10s
-
Point clouds and plane detection3m 40s
-
(Locked)
Deploying the app on your devices2m 50s
-
(Locked)
Tap on screen to place on plane: Part 13m 8s
-
Tap on screen to place on plane: Part 24m 28s
-
(Locked)
Tap on screen to place on plane: Part 34m
-
(Locked)
Hiding plane visualizers2m 8s
-
(Locked)
FocusSquare to place on plane13m 40s
-
(Locked)
Resetting and reloading the ARSession2m 43s
-
(Locked)
-
-
-
-
-