# Wearable Set Data

The Wearable Set Data class holds strings and arrays containing references to the wearables, materials and cosmetics for a Wearable Set. Its’ purpose is to easily convert JSON data to and from Wearable Sets, which can be equipped to the Character.&#x20;

The Modular Character Manager can export the currently equipped set to Wearable Set Data. It can also convert Wearable Set Data to a Wearable Set to be applied to the character. In this way, you can save and load a Wearable Set during Runtime.

#### Creating a JSON file with Wearable Set Data

If you want to be able to save a set in a build, you can do so using the **SaveDataAsJSON** function in the Modular Character Manager. This will save a copy of the current Wearable Set as a JSON file to the  'Saved Data' folder.

Calling the function will create Wearable Set Data generated directly from the current character configuration. This code will check your specified save location to see if a folder with the [Character Style](https://stellar-game-assets.gitbook.io/modular-character-system/system-overview/character-style) name exists. If no such folder exists, it will create one. It will then copy the current set and save it as JSON data in that location.&#x20;

{% hint style="info" %}
The saved data can be captured and loaded during Runtime using the [persistent path](https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html) or your own save tools.&#x20;
{% endhint %}

#### Loading and Equipping a Wearable Set from a JSON file

You can load a JSON file containing Wearable Set Data and convert it to a Wearable Set to be equipped by calling the **LoadCharacterFromJSON** function from the Modular Character Manage&#x72;**.**

Calling the function will load a JSON file, convert the Wearable Set Data to a Wearable Set, and then equip that set to the Character. You will need to pass the Modular Character Manager, a new set name, and a save location to the function.
