Skip to content

arenaxr/arena-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

828 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

arena-unity

Unity C# library for editing scenes and creating applications for the ARENA.

Installation

  1. Open a new or existing Unity project. Unity 2022.3+ supported.
  2. Edit > Project Settings > Player > PC, Mac & Linux Standalone > Resolution and Presentation > Resolution:
    • Run In Background set to true.
  3. Open Window > Package Manager and click + > Add package from git URL....
  4. Enter https://github.com/arenaxr/arena-unity.git and click Add.

User Quick Start

  1. Create an empty GameObject in your scene (e.g., name it ARENA).
  2. Select the ARENA GameObject and press Add Component to attach the ArenaClientScene script.
  3. Modify the inspector variables for the ArenaClientScene script (e.g., Host Address, Namespace Name, Scene Name).
  4. Press Play in the Unity Editor. The auth flow will open a browser to log in.
  5. Persistent ARENA objects will automatically load as child GameObjects. Any modified properties will sync remotely.

Note: For advanced usage like exporting GLTF models or using the ARENA Mesh Tool, see the ARENA Unity Editor Documentation.

Developer Quick Start

You can programmatically connect and interact with an ARENA scene using the ArenaClientScene singleton.

using ArenaUnity;
using UnityEngine;

public class ArenaDemo : MonoBehaviour
{
    private ArenaClientScene scene;

    void Start()
    {
        scene = ArenaClientScene.Instance;
        scene.hostAddress = "arenaxr.org";
        scene.namespaceName = "public";
        scene.sceneName = "example";
        
        StartCoroutine(scene.ConnectArena());
    }

    void Update()
    {
        if (scene.mqttClientConnected)
        {
            // Connected! You can now publish objects or listen to messages.
        }
    }
}

Note: For detailed API examples, custom message processing, and comprehensive component references, see the ARENA Unity Runtime Documentation and Requirements Architecture.

Library Reference

Alternate Server Usage

In addition to the above, you may deploy your own ARENA webserver if you do not wish to use our test deployment server at arenaxr.org. You can follow our setup guidelines in arenaxr/arena-services-docker to run your own server.

About

Unity C# library for editing scenes and creating applications for the ARENA.

Resources

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
LICENSE.meta

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages