Application Simulator for Unity
Beginning with Magic Leap Unity SDK package version 2.0.0, the Magic Leap Application Simulator for Unity package will be officially deprecated. This decision comes as a response to community feedback and our ongoing effort to improve the developer experience.
Application Simulator will continue to be accessible to Unity developers through the Magic Leap Hub module.
The App Sim (short for "Application Simulator) for Unity is an offering that is separate, but related to the App Sim. Previously, it was recommended to use the App Sim (through the Magic Leap Hub), but due to performance and compatibility reasons, it is now recommended following the steps outlined on this page and not using the pattern involving strating the App Sim in the ML Hub, switching to Unity, and clicking Play.
Application Simulator can now be used from within Unity as a native plugin without having to open ML Hub. This is enabled using the Magic Leap Application Simulator for Unity package. Note: this package still requires that both the ML Hub and Application Simulator Runtime are installed.
System Requirements
System Requirements for the App Sim
Prerequisites
- Installed the ML Hub.
- Installed App Simulator.
- Configured Unity Settings for Magic Leap.
- Configured Unity Settings for App Simulator.
Downloading Application Simulator for Unity
- Start the ML Hub, open the Package Manager, and go to the All tab.
- Select the latest version of the Magic Leap Application Simulator for Unity, and click on the Download button.
- Click on Apply Changes.
After installing the package, search for it in the Package Manager, and click on Open Folder. This will help you with the next step of the process.
Installing Application Simulator for Unity
- In Unity, go to Window > Package Manager, then click on the + icon and select Install Package from Tarball.
- Navigate to where the package is located, and open the
com.magicleap.appsim.tgz
file.
- After a quick installation, the package should now be visible under the name Magic Leap App Simulator in the Package Manager.
Make sure you select Install package from Tarball, as otherwise, you will fail to find the package.
Running Application Simulator for Unity
A new Magic Leap menu will now appear under Unity's Windows tab. If you do not see it, restart the Unity editor.
- Go to Windows > Magic Leap App Simulator > Load Default Layout.
- The Target Selector panel will now appear in the upper-left portion of your Unity editor. You can now select your Target.
- Click on the Play button next to your Target.
With the App Sim for Unity, there are now two identical-in-appearance "Play" buttons. One is for selecting your Target and the other for playing your Scene.
- Click on the Play button in the top-center of the Unity editor window.
Once a new session has been started, you should now be able to use the Application Simulator from within the Unity editor.
Arranging the Workspace
From the same dropdown menu, you can open panels with other Application Simulator tabs, such as Device View, Hand Tracking, and more.
Those panels offer the same functionalities as other Unity Editor panels — they can be positioned, scaled, arranged, and docked to your workspace to suit your preferences.