From the course: Unity: AR Visualization 02 Basic Interactivity
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Creating the save method - Unity Tutorial
From the course: Unity: AR Visualization 02 Basic Interactivity
Creating the save method
- [Instructor] Now that we've got our data containers, it's time to fill them. We're going to fill them with a save method, we're going to trigger that save method from the ARPartManager, so let's click on that and open it up. Alright, we don't have much in here, so let's go and add another method for save. So right at the bottom, let's go and add in a public static void Save. Alright, so let's walk through this logically, we need to create the manifest container, we then need to go and populate that manifest data with ARPart data, and that ARPart data needs to contain the data from the ARParts, we need to serialize that, and save that that to player prefs, so let's start with the first thing, let's make a manifest, ARPartManifest, going to name that manifest is equal to a new ARPartManifest. Excellent, now let's loop through the parts and populate this manifest. Alright, so let's go manifest.parts.Add. Alright…
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)
How and where is your data to be saved?54s
-
(Locked)
Creating the part dynamic data structure2m 32s
-
(Locked)
Creating the save method4m 20s
-
(Locked)
Creating the load method4m 40s
-
(Locked)
Creating the reset method1m 53s
-
(Locked)
Adding the data buttons to the parts menu5m 4s
-
AR app in action1m 13s
-
(Locked)
-