Shared Spatial Anchors
Updated: Sep 4, 2024
Note: Shared Spatial Anchors are forward compatible, but they are not always backward compatible. Sharing anchors to SDK versions previous to V57 is not guaranteed to work. However, sharing anchors from an older SDK version to a newer SDK version (such as from V52 to V53) will work.
The Shared Spatial Anchors (SSA) feature allows players who are located in the
same physical space to share content while using the same app. With SSAs you
can create a shared, world-locked frame of reference for many users. For
example, two or more people can sit at the same table and play a virtual board
game on top of it. Currently, SSA supports local multiplayer games in a single
room.
Though you create and share spatial anchors with this SDK you enable sharing through a third-party network solution.
After reading this page, you should be able to:
- Describe the functionality of Shared Spatial Anchors in a multiplayer environment.
- Explain the steps to configure an app for sharing Spatial Anchors.
- Carry out the steps to share a spatial anchor using the ShareAnchors API.
The basic prerequisites for the SSA feature are the same as those of the Spatial
Anchors feature. In addition,
- Your application must be registered on your developer dashboard, and it must
support SSA. See the Shared Spatial Anchor section
Set up Project Environment
for specifics.
- Set up your chosen network solution in a way that facilitates multiplayer
collaboration. More on this in the next section.
- There are also requirements for specific Quest headsets tied to the SDK
version used:
- Meta Quest 3 fully supports Shared Spatial Anchors.
- Meta Quest Pro supports Shared Spatial Anchors starting in v47.
- Quest 2 supports Shared Spatial Anchors starting in v49.
- Quest 1 does not support Shared Spatial Anchors.
- The device setting ‘Enhanced Spatial Services’ must be enabled.
It can be found under Settings > Privacy > Device Permissions >
Turn on “Enhanced Spatial Services”. More on this below.
Applications requesting access to persisted Spatial Anchors need to have their identity verified. Because this verification uses information registered in the Store, your application will not be able to persist or share Spatial Anchors until you register your app on
the developer dashboard.
To enable Spatial Anchor persistence and sharing in your app, you will need to:
- Have a verified Meta developer account. If you haven’t yet, sign-up here.
- Create or join an organization you will develop your app under. For more information, see Manage Your Organization and Users.
- Create an App ID.
- Enable “User ID” and “User Profile” in Data Use Checkup.
Create your Quest app in the developer dashboard, and if you will use Link to run the app from your PC repeat these steps to also create a PC-VR app.
You must complete a
Data Use Checkup (DUC) on each of your apps. To enable spatial anchor persistence:
- Obtain admin access to your app if you don’t have it already.
- Go to the Meta Quest Developer Dashboard.
- Select your App.
- In the left-side navigation, click Requirements > Data Use Checkup.
- Add User ID and User Profile Platform features.
- Click the Submit recertification button.
The features requested above will not be available to users of your app until the
Data Use Checkup review process is complete. In order to proceed with development, you will want to create a
Test User, which is exempt from DUC requirements. See
How to develop apps while waiting for DUC approvals for more details.
Set up app release channel In order to obtain entitlements for the user accounts used during development (including test users), you should add them to one of the release channels associated with your app. Release Channels are configured in the Distribution section of the app configuration.
Finally, you should upload an APK for your test app to the same release channel to which you added your development users. Make certain that the APK is built using the App ID that matches the one defined in the app configuration so that the entitlement checks are successful.
Share a spatial anchor using Group Sharing - Generate an array of anchor UUIDs to share.
- Determine the UUID of the group you wish to share with. This does not have to be a colocation session UUID, it can be any randomly generated ID that all parties have.
- Use the
ShareAnchorsAsync
API to generate an AsyncRequest
by providing the anchor UUIDs and group UUIDs. - A result delegate will fire with success or error codes that determine if the anchors were successfully shared with the specified groups.
ShareAnchors with Groups Blueprint API Here is a screenshot of what the ShareAnchorsAsync api looks like in blueprint.

ShareAnchors with Groups C++ API The ShareAnchors C++ API is accessed through the OculusXRAnchors interface. The API takes an array of anchor handles of type UInt64 and an array of group UUIDs. It also requires a delegate parameter as an argument which will be executed on success or failure. The return type of the API call is TSharedPtr<FShareAnchorsWithGroups>
. The FShareAnchorsWithGroups
type is class that wraps an underlying AsyncRequest
type and the function call will configure and execute the AsyncRequest
for you. Completion, both failure and success, will occur on the game thread. Either immediately as the request is executed or after some number of frames.
The following describes the completion delegate and its parameters.
Delegate | Parameters |
---|
FShareAnchorsWithGroups::FCompleteDelegate
| FShareAnchorsWithGroup::FResultType Result
|
Share anchors with Groups C++ example
You are not required to use a lambda as your delegate functor, that is only used to simplify this example.
void ShareAnchors(const TArray<uint64>& Anchors, FOculusXRUUID Group)
{
OculusXRAnchors::FOculusXRAnchors::ShareAnchorsAsync(
Anchors,
{Group},
FShareAnchorsWithGroups::FCompleteDelegate::CreateLambda([](
const FShareAnchorsWithGroup::FResultType& Result)
{
if (Result.IsSuccess())
{
auto value = Result.GetValue();
// Do something with the value on success
}
else
{
auto status = Result.GetStatus()
// Do something with the status code on error
}
})
);
}
Share a spatial anchor using User IDs - Save anchors before performing a share request.
- Generate an array of anchor UUIDs to share.
- Determine the User IDs of the other players you will share with.
- Use the
ShareAnchors
API by providing the anchor UUIDs and User IDs as parameters. - Result codes will determine if the anchors were successfully shared with the specified users.
ShareAnchors with User IDs Blueprint API Here is a screenshot of what the ShareAnchors api looks like in blueprint.

ShareAnchors with User IDs C++ API The ShareAnchors C++ API is accessed through the OculusXRAnchors interface. The API takes a delegate parameter as an argument which will execute on success or failure. The following describes the delegate and its parameters.
Delegate | Parameters |
---|
FOculusXRAnchorShareDelegate
| EOculusXRResult::Type Result,
const TArray<UOculusXRAnchorComponent*> Anchors,
const TArray<uint64> Users
|
Share anchors with User IDs C++ example
You are not required to use a lambda as your delegate functor, that is only used to simplify this example.
EOculusXRAnchorResult::Type ShareAnchors(const TArray<UOculusXRAnchorComponent*>& AnchorComponents, const TArray<FString>& OculusUserIDs)
{
EOculusXRAnchorResult::Type OutResult; // Detailed immediate (non-async) result code
OculusXRAnchors::FOculusXRAnchors::ShareAnchors(
AnchorComponents,
OculusUserIDs,
FOculusAnchorShareDelegate::CreateLambda([](
EOculusResult::Type Result,
const TArray<UOculusAnchorComponent*>& Anchors,
const TArray<uint64>& Users)
{
// Post-share logic here
}),
OutResult
);
return OutResult;
}
Retrieve shared spatial anchors - The sharing user needs to notify the other user that an anchor has been shared with them. In Unreal this can be done with an RPC.
- The receiving user will need to request their shared anchor using the Blueprint or C++ api
GetSharedAnchors
- The result of this function will determine if the anchor is available and has been localized to the receiving user’s device.
GetSharedAnchorsAsync from Group Blueprint API Here is a screenshot of what the GetSharedAnchorsAsync API looks like in blueprint.

GetSharedAnchorsAsync from Group C++ API The GetSharedAnchorsAsync
C++ API is accessed through the OculusXRAnchors interface. The API takes a group UUID and a delegate parameter as an argument which will execute on success or failure. The return type of the API call is TSharedPtr<FGetAnchorsSharedWithGroup>
. The FGetAnchorsSharedWithGroup
type is class that wraps an underlying AsyncRequest
type and the function call will configure and execute the AsyncRequest
for you. Completion, both failure and success, will occur on the game thread. Either immediately as the request is executed or after some number of frames.
The following describes the delegate and its parameters.
Delegate | Parameters |
---|
FGetAnchorsSharedWithGroup::FCompleteDelegate
| FGetAnchorsSharedWithGroup::FResultType Result
|
Get shared anchors from Group C++ example
You are not required to use a lambda as your delegate functor, that is only used to simplify this example.
void GetSharedAnchors(const FOculusXRUUID& GroupUUID)
{
OculusXRAnchors::FOculusXRAnchors::GetSharedAnchorsAsync(
GroupUUID,
FGetAnchorsSharedWithGroup::FCompleteDelegate::CreateLambda([](
const FGetAnchorsSharedWithGroup::FResultType& Result)
{
if (Result.IsSuccess())
{
TArray<FOculusXRAnchor> anchors = Result.GetValue();
for(auto& it : anchors)
{
// Do something with the value on success
}
}
else
{
auto status = Result.GetStatus()
// Do something with the status code on error
}
})
);
return OutResult;
}
GetSharedAnchors via User ID Sharing Blueprint API Here is a screenshot of what the GetSharedAnchors API looks like in blueprint.

GetSharedAnchors via User ID Sharing C++ API The GetSharedAnchors C++ API is accessed through the OculusXRAnchors interface. The API takes a delegate parameter as an argument which will execute on success or failure. The following describes the delegate and its parameters.
Delegate | Parameters |
---|
FOculusXRGetSharedAnchorsDelegate
| EOculusXRResult::Type Result,
const TArray<FOculusXRAnchorsDiscoverResult>& Results
|
Get shared anchors via User ID Sharing C++ example
You are not required to use a lambda as your delegate functor, that is only used to simplify this example.
EOculusXRAnchorResult::Type GetSharedAnchors(const TArray<FOculusXRUUID*>& AnchorUUIDs)
{
EOculusXRAnchorResult::Type OutResult; // Detailed immediate (non-async) result code
OculusXRAnchors::FOculusXRAnchors::GetSharedAnchors(
AnchorUUIDs,
FOculusXRGetSharedAnchorsDelegate::CreateLambda([](
EOculusResult::Type Result,
const TArray<UOculusXRAnchorsDiscoverResult*> Results)
{
// Post-receive logic here
}),
OutResult
);
return OutResult;
}
If ShareAnchors
, ShareAnchorsAsync
, GetSharedAnchors
, or GetSharedAnchorsAsync
fails with result Failure_SpaceCloudStorageDisabled
this indicates that the ‘Enhanced Spatial Services’ permission has not been enabled. In this case your application should inform users to turn on Enhanced Spatial Services by going to Settings > Privacy > Device Permissions > Turn on “Enhanced Spatial Services”.
Continue learning about spatial anchors by reading these pages:
You can find more examples of using spatial anchors with Meta Quest in the
Samples GitHub repository:
To get started with Meta Quest Development in Unreal, see the
Unreal Engine page.