Unity C# library for editing scenes and creating applications for the ARENA.
- Open a new or existing Unity project. Unity 2022.3+ supported.
Edit > Project Settings > Player > PC, Mac & Linux Standalone > Resolution and Presentation > Resolution:Run In Backgroundset totrue.
- Open
Window > Package Managerand click+ > Add package from git URL.... - Enter
https://github.com/arenaxr/arena-unity.gitand click Add.
- Create an empty GameObject in your scene (e.g., name it
ARENA). - Select the
ARENAGameObject and press Add Component to attach theArenaClientScenescript. - Modify the inspector variables for the
ArenaClientScenescript (e.g., Host Address, Namespace Name, Scene Name). - Press Play in the Unity Editor. The auth flow will open a browser to log in.
- 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.
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.
- Requirements & Architecture (Detailed component mappings and source index)
- Components Priority
- Contributing
- Release Checklist
- Changelog
- Open Source used and inspired from
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.
