Skip to content

Latest commit

 

History

927 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arena-unity

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

Installation

  1. Open a new or existing Unity project. Unity 6 (6000.0)+ 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.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

Troubleshooting

Shader errors (_WorkflowMode or pink/magenta materials)

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:

  1. Go to Edit > Project Settings > Graphics
  2. Under Shader Preloading, add the glTFast shaders (glTF/PbrMetallicRoughness, glTF/PbrSpecularGlossiness, glTF/Unlit) to the Always Included Shaders list
  3. Alternatively, create a ShaderVariantCollection that 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.

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

Contributing

Stars

5 stars

Watchers

10 watching

Forks

Releases

Packages

Used by

Contributors

Languages