Unity C# library for editing scenes and creating applications for the ARENA.
- Open a new or existing Unity project. Unity 6 (6000.0)+ 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.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
If you see errors about missing shader properties like _WorkflowMode, or GLTF models render as pink/magenta, this is typically a glTFast shader variant stripping issue. Unity's build pipeline strips shader variants it considers unused, but glTFast needs them at runtime for glTF import.
To fix:
- Go to Edit > Project Settings > Graphics
- Under Shader Preloading, add the glTFast shaders (
glTF/PbrMetallicRoughness,glTF/PbrSpecularGlossiness,glTF/Unlit) to the Always Included Shaders list - Alternatively, create a
ShaderVariantCollectionthat includes the required variants
If the error specifically mentions _WorkflowMode, your URP version may not match what glTFast expects. Ensure your URP package is compatible with your glTFast version.
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.
