# Tutorial: Sharing Anchors

### **Introduction**

Sharing anchors between devices is essential for multi-user AR experiences. This tutorial will guide you through the process of sharing anchors by using Photon to transmit anchor UUIDs in real-time and cloud storage to persistently store the anchor data.

At a high level, the process works as follows:

1. When a user creates an anchor, its UUID is sent to other users in the same Photon room.
2. The anchor data is then stored in a cloud storage solution.
3. Other users in the room, upon receiving the UUID, access the cloud storage to download the anchor data.
4. Once downloaded, the anchor is loaded into their AR scene, effectively sharing the anchor across devices.

For the cloud storage part, any cloud storage provider that allows file upload and download can be used. In this tutorial, we provide examples for two cloud storage solutions:&#x20;

* Firebase &#x20;
* Alibaba Cloud OSS.&#x20;

The methods for other providers should be similar, and developers are encouraged to explore the options that best suit their needs.

### **Prerequisites**

* Unity with NRSDK 2.1 installed.
* Photon Unity Networking 2 (PUN 2) package.
* Firebase Unity SDK.

### All Materials Needed in This Tutorial

{% hint style="info" %}
The following package includes all the necessary scene and the majority of the scripts required for this tutorial. However, it's important to note that developers will still need to complete the steps related to [photon](https://xreal.gitbook.io/nrsdk/v2.1.0/development/spatial-anchor/tutorial-sharing-anchors/setting-up-photon) and cloud storage themselves.

Additionally, due to the tutorial's involvement with modifications to the built-in scripts of NRSDK, specifically NRWorldAnchor.cs and NRWorldAnchorStore.cs, these changes cannot be included within this package. Please refer to the tutorial's content, specifically in the section on '[Implementing Cloud Save and Load](https://xreal.gitbook.io/nrsdk/v2.1.0/development/spatial-anchor/tutorial-sharing-anchors/implementing-cloud-save-and-load),' to make the necessary modifications.
{% endhint %}

{% file src="<https://1774958057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIM2VX8TwuOpFaP0UDa6i%2Fuploads%2FwiHTp0c4rnSQ7uoi0WPT%2FShareAnchor.unitypackage?alt=media&token=bc5a8fca-5767-488e-842d-a1b0c665fa77>" %}
