Skip to content

Unity package for creating experiences with Solipsist Stage.

License

Notifications You must be signed in to change notification settings

solipsist-studios/stage-unity

Repository files navigation

stage-unity

Unity package for creating experiences with Solipsist Stage.

NB: This package is in preview! Do not depend on the API for experiences in production!

About

The goal of the Stage platform is to provide creators with the tools to share their mixed reality creations with the world. Powered by Azure Spatial Anchors and built to run in the Azure cloud.

A fully-managed, hosted service is offered for those who are looking to start building without the technical overhead. See Solipsist Studios Homepage.

Self-hosting is always free!

Features

  • Support for Netcode for Game Objects networking package
  • Serialize and deserialize objects attached to spatial anchors

Supported Platforms

  • Android devices (API >= 8.0)
  • Microsoft HoloLens 2
  • WebXR coming soon!

Also probably works on iOS and Magic Leap, but is untested.

Getting Started

  1. Import Dependencies Using the Mixed Reality Feature Tool to import dependencies

    1. Use the Microsoft Mixed Reality Feature Tool to install the following features:
      1. Azure Mixed Reality Services
        1. Azure Spatial Anchors SDK Core
        2. Azure Spatial Anchors SDK (Windows, iOS and/or Android)
      2. MRTK3
        1. MRTK Core Definitions
        2. MRTK Graphics Tools
        3. MRTK Input
      3. Platform Support
        1. Mixed Reality OpenXR Plugin
    2. Install Unity packages using Install from a Git URL for the following packages:
      1. WebSocket transport for Netcode for Game Objects https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.websocket
      2. Add this package from a Git URL using the same process: https://github.com/solipsist-studios/stage-unity.git
    3. Set up MRTK or other XR interaction packages according to their instructions
  2. Add necessary prefabs to scene Adding prefabs to the scene

    1. Network Manager
    2. Azure Spatial Anchors Manager
  3. Add calls to load / save spatial anchors Connecting Add Anchor behaviour

    1. Call the AzureSpatialAnchorsManager.AzureSpatialAnchors.AddAnchor function to persist an object
    2. Subscribe to AzureSpatialAnchorsManager.AzureSpatialAnchors.AnchorLocatedCallback to be notified when an anchor is loaded
  4. Create a server configuration

    1. Under Assets, create a Resources folder, and in that folder create a Solipsist Stage->Configuration asset
    2. Accept the default name, StageConnectionConfig.asset
  5. Build the Unity project for the Dedicated Server/Linux platform

  6. Add the contents of the build directory, excluding the ..._BurstDebugInformation_DoNotShip folder, to a .tar.gz archive.

  7. Use the solx CLI tool to upload and launch your dedicated server

    1. Follow the steps to download and use the solx CLI tool.
    2. Open a command prompt
    3. Navigate to the folder where you have extracted the solx.exe file
    4. Run the following command
.\solx cat add --file "c:\path\to\your\linuxserver.tar.gz" --name <app-name>

Note that app-name should contain only alphanumeric characters or '-' 1. When that completes, take note of the experience-id that is generated 1. Run the following command

.\solx cat launch --experience-id 00000000-0000-0000-0000-000000000000

Replacing the experience-id with the one you copied from the previous step

  1. Build and deploy the Unity project to your client devices Your Azure administrator can provide you with the values for the following steps
    1. In Unity, open the Assets/AzureSpatialAnchors.SDK/Resources/SpatialAnchorConfig.asset file
    2. In the inspector, select "Api Key" for Authentication Mode, and fill out each value under Credentials
    3. Open the StageConnectionConfig.asset file you created in an earlier step
      1. Change Network Role to Client
      2. Fill out the remaining values according to your server
    4. Build the project for your desired platform and run

About

Unity package for creating experiences with Solipsist Stage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages