From the course: Unity: AR Visualization 02 Basic Interactivity

Unlock the full course today

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

Creating the save method

Creating the save method - Unity Tutorial

From the course: Unity: AR Visualization 02 Basic Interactivity

Start my 1-month free trial

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…

Contents