onAirXR Client is a statemachine which connects to onAirXR platforms : onAirXR or onAirXR Enterprise.
This diagram demonstrates how the onAirXR Client statemchine works. Note that it is a simplification of the actual implementation, but does a good job explaining the basic structure.

This example code shows how to implement the simplest onAirXR Client app.
using onAirXR.Client;
public class App : MonoBehaviour, AXRClient.Context {
private AXRClientState _state = AXRClientState.Idle;
private void Awake() {
// Must configure AXRClient on Awake()
AXRClient.Configure(this);
}
private async void Start() {
await Task.Delay(1000);
// AXRClient is loaded in the first frame, so you can access it from the second frame at least.
AXRClient.StartLinking();
}
private void Update() {
var next = AXRClient.state;
if (next == _state) { return; }
switch (next) {
case AXRClientState.Linking:
Debug.Log("Linking to 192.168.10.27:9090");
break;
case AXRClientState.Linked:
Debug.Log($"Linked");
break;
case AXRClientState.Playing:
Debug.Log($"Start Playing");
break;
}
_state = next;
}
AXRPlatform AXRClient.Context.platform => AXRPlatform.onAirXR;
string AXRClient.Context.address => "192.168.10.27:9090";
bool AXRClient.Context.autoPlay => false;
void AXRClient.Context.OnPreRequestLink(AXRProfileBase profile) {
// set client info when requesting to link
profile.userID = "myuser";
profile.place = "myplace";
}
void AXRClient.Context.OnLinked() {}
}
Getting Started
**📄 [Download & Install](<https://clickedcorp.notion.site/Download-Install-f8e47d7346f749f79593fcc33c150d4a>)**
Features
**📄 [Anchor](<https://clickedcorp.notion.site/Anchor-1a9e93a1a29f485e8029a77c7a94d631>)**
📄 Autoplay