Skip to main content
Version: 12 Dec 2024

App Simulator

This document demonstrates how to use the MagicLeapXrProvider to check if the application is using the Magic Leap App Simulator.

Example

The following script debugs true if the application is running inside the Magic Leap App Simulator.

using System.Collections;
using UnityEngine;
using UnityEngine.XR.MagicLeap;

public class RuntimeDetectionExample : MonoBehaviour
{
void Start()
{
Debug.Log("App Simulator Is Running = " UnityEngine.XR.MagicLeap.MagicLeapXrProvider.IsZIRunning);
}
}