> For the complete documentation index, see [llms.txt](https://friendlysadist.gitbook.io/vaultlogic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://friendlysadist.gitbook.io/vaultlogic/code-and-design/persistence/inventory-serialization.md).

# Inventory Serialization

For serializing an inventory component (assuming you are using the included serialization method) you simply need to call the SaveInventory function in your inventory.

<figure><img src="https://2131464422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F91zilIyQJBC2i7Yki7Wg%2Fuploads%2FKPMvnrXEcUKLjazcMRTb%2Fimage.png?alt=media&amp;token=3c239d87-7179-4151-b947-27aa093ee4a3" alt=""><figcaption></figcaption></figure>

This function will output a serializable structure that includes the contents and the ID to distinguish this inventory from the rest. You simply save the output of this function to a variable in your SaveGame object and then when loading it, you can call LoadFromSave which will receive the structure you saved in the previous step and recreate the inventory from it.

<figure><img src="https://2131464422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F91zilIyQJBC2i7Yki7Wg%2Fuploads%2FmiqVy10bFMEkwtfHgzgM%2Fimage.png?alt=media&amp;token=16c10747-64c3-4f9f-a4af-5260ba275d9c" alt=""><figcaption></figcaption></figure>
