Magic Leap Setup Tool Stuck at Loading

Give us as much detail as possible regarding the issue you're experiencing.

Unity Editor version: 2022.3.1, 2022.2.21, 2022.2.2
ML2 OS version: 1.3.0
MLSDK version: 1.9.0
Host OS: (Windows/MacOS): Windows

Error messages from logs (syntax-highlighting is supported via Markdown):
No error message available, but when using Magic Leap Setup Tool, it got stuck at loading forever. I started with 2022.3.1 and there's no such bug, then switched to 2022.2.21 still no such bug (I switched version since the vuforia sample seems to require a older version of unity). But after I switched to 2022.2.2 the bug appears and now I cannot fix it even in 2022.2.21 and 2022.3.1.

Hi @zhhqu0305,
Thank you for reporting this issue. The new version of the Magic Leap Setup Tool is incompatible with older versions of Unity due to a change in the com.unity.xr.magicleap package. I will work on a fix to the setup tool so that this incompatibility fails gracefully and doesn't cause an infinite loading bar.

Until the 2.0.4 update, please follow these steps to fix the issue:

  1. Force close Unity
  2. Open the Packages folder in your project directory
  3. Delete the com.magicleap.setuptool folder
  4. Reopen your project

Note: the Vuforia package should work on the latest 2022 LTS version of Unity

Thanks for your reply! I followed your instructions but the problem remains. In this case what would be the minimum required Unity version to avoid this issue?

For Vuforia package, I think there's some override incompatibility with GestureSubsystem.CreateProvider(). The error message looks like this:

Library\PackageCache\com.magicleap.unitysdk@6973bf91e4dd\Runtime\Subsystems\Gesture\GestureSubsystem.cs(38,37): error CS0115: 'GestureSubsystem.CreateProvider()': no suitable method found to override

Perhaps there's something to do with the [1.0.1] version and [2.0.0] version? (Seems I cannot post a link here) I know that this might not be your job, but do you think this is probably also due to Unity version? Since you explicitly mentioned in the setup instructions that 2022.2.x should be used instead of 2022.3.x.


The Unity Package Manager should download the correct version of the package based on your Unity version. Just make sure to uninstall the package when downgrading from the LTS of Unity.

Can you share your manifest.json file? I was able to create and build a Vuforia project using Unity 2022.3.0 and the following packages:

com.magicleap.unitysdk: 1.9.0
com.ptc.vuforia.engine: com.ptc.vuforia.engine-10.15.4.tgz
com.unity.xr.magicleap: 7.0.0

Can you try deleting your library folder and see if that fixes the issue? If that doesn't work, can you share your editor log file?

You can find the editor logs here:
Windows: %localappdata%\Unity\Editor\
OS X: ~/Library/Logs/Unity/

Thanks for your reply. I'm now trying with your setup. Deleting the library folder itself didn't help.

Also, is it that the LTS versions wouldn't work? I've been using 2022.3.1f1 previously, and for testing other versions I simply installed multiple editors.


I tested on Unity Version 2022.3.6f1, first time there's still infinite loading bug, but after I rebooted I successfully imported the setup tool. When importing the Vuforia Sample, I got the following message:

Library\PackageCache\com.magicleap.unitysdk@6973bf91e4dd\Runtime\Subsystems\Gesture\GestureSubsystem.cs(38,37): error CS0115: 'GestureSubsystem.CreateProvider()': no suitable method found to override

My manifest.json:

"com.magicleap.unitysdk": "file:com.magicleap.unitysdk.tgz",
"com.ptc.vuforia.engine": "file:com.ptc.vuforia.engine-10.16.5.tgz",
"com.unity.xr.magicleap": "7.0.0",

Here's the editor log file

##### Custom Environment Variables
##### ExitCode
##### Output
Library\PackageCache\com.magicleap.unitysdk@6973bf91e4dd\Runtime\Subsystems\Gesture\GestureSubsystem.cs(38,37): error CS0115: 'GestureSubsystem.CreateProvider()': no suitable method found to override
*** Tundra build failed (7.84 seconds), 420 items updated, 901 evaluated
## Script Compilation Error for: Csc Library/Bee/artifacts/1300b0aE.dag/MagicLeap.SDK.dll (+2 others)
## CmdLine: "D:\Unity\Random\2022.3.6f1\Editor\Data\NetCoreRuntime\dotnet.exe" exec "D:/Unity/Random/2022.3.6f1/Editor/Data/DotNetSdkRoslyn/csc.dll" /nostdlib /noconfig /shared "@Library/Bee/artifacts/1300b0aE.dag/MagicLeap.SDK.rsp" "@Library/Bee/artifacts/1300b0aE.dag/MagicLeap.SDK.rsp2"
## Output:
Library\PackageCache\com.magicleap.unitysdk@6973bf91e4dd\Runtime\Subsystems\Gesture\GestureSubsystem.cs(38,37): error CS0115: 'GestureSubsystem.CreateProvider()': no suitable method found to override

Library\PackageCache\com.magicleap.unitysdk@6973bf91e4dd\Runtime\Subsystems\Gesture\GestureSubsystem.cs(38,37): error CS0115: 'GestureSubsystem.CreateProvider()': no suitable method found to override
Failed to find entry-points:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'SamplesScripts, Version=, Culture=neutral, PublicKeyToken=null' ---> System.Exception: Failed to resolve assembly 'SamplesScripts, Version=, Culture=neutral, PublicKeyToken=null' in directories: D:\Unity\Random\2022.3.6f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit-win32
D:\Unity\Projects\TTT\Library\ScriptAssemblies ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'SamplesScripts, Version=, Culture=neutral, PublicKeyToken=null'
  at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00105] in <853812ae52c341daaef3c62ecdb86b32>:0 
  at zzzUnity.Burst.CodeGen.AssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00013] in <532a8a169e6a4953b5d9a4c213b71772>:0 
   --- End of inner exception stack trace ---
  at zzzUnity.Burst.CodeGen.AssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00060] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.AssemblyLoader.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0007e] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00055] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.FindMethods (Burst.Compiler.IL.Server.CompilationRequest request, Burst.Compiler.IL.Server.Caching.CacheManager cacheManager, Burst.Compiler.IL.CompilerStatistics stats) [0x000f5] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer+<>c__DisplayClass17_0.<Compile>b__0 (Burst.Compiler.IL.Server.Caching.CacheManager cacheManager) [0x00000] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer+<>c__DisplayClass26_0`1[TResult].<RunTask>b__0 () [0x00145] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.RunTask[TResult] (Burst.Compiler.IL.Server.TargetKey target, System.String taskName, System.String[] assemblyFolders, System.Threading.CancellationToken cancellationToken, System.Func`2[T,TResult] function) [0x00131] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.Compile (Burst.Compiler.IL.Server.CompilationRequest request, Burst.Compiler.IL.Server.CompilationMessageStreamer streamer, System.Threading.CancellationToken cancellationToken) [0x0017f] in <532a8a169e6a4953b5d9a4c213b71772>:0 

While compiling job:
Asset Pipeline Refresh (id=15355d930fef2db428f48294fdd04773): Total: 7.022 seconds - Initiated by RefreshV2(ForceSynchronousImport)
		Imports: total=0 (actual=0, local cache=0, cache server=0)
		Asset DB Process Time: managed=0 ms, native=18 ms
		Asset DB Callback time: managed=0 ms, native=86 ms
		Scripting: domain reloads=0, domain reload time=0 ms, compile time=6917 ms, other=0 ms
		Project Asset Count: scripts=8026, non-scripts=2217
		Asset File Changes: new=0, changed=0, moved=0, deleted=0
		Scan Filter Count: 0
	InvokeBeforeRefreshCallbacks: 86.977ms
	ApplyChangesToAssetFolders: 0.052ms
	Scan: 1.296ms
	OnSourceAssetsModified: 0.000ms
	GetAllGuidsForCategorization: 0.289ms
	CategorizeAssets: 3.375ms
	ImportOutOfDateAssets: 3.827ms (-6916.482ms without children)
		CompileScripts: 6917.098ms
		ReloadNativeAssets: 0.083ms
		UnloadImportedAssets: 0.083ms
		EnsureUptoDateAssetsAreRegisteredWithGuidPM: 1.038ms
		InitializingProgressBar: 0.001ms
		PostProcessAllAssetNotificationsAddChangedAssets: 0.000ms
		OnDemandSchedulerStart: 2.005ms
	GatherAllCurrentPrimaryArtifactRevisions: 0.417ms
	UnloadStreamsBegin: 1.210ms
	PersistCurrentRevisions: 0.351ms
	UnloadStreamsEnd: 0.047ms
	Untracked: 6924.267ms
[MODES] ModeService[default].LoadModes
[MODES] Loading mode Default (0) for mode-current-id-TTT
<RI> Initialized touch support.
Asset Pipeline Refresh (id=8b97394585e82e5459e530ea5a94f198): Total: 0.097 seconds - Initiated by RefreshV2(AllowForceSynchronousImport)
<RI> Initialized touch support.
[Licensing::Client] Successfully resolved entitlements
[Licensing::Client] Successfully resolved entitlements
Android Extension - Scanning For ADB Devices 0 ms
Android Extension - Scanning For ADB Devices 154 ms
Attempted to call .Dispose on an already disposed CancellationTokenSource
Android Extension - Scanning For ADB Devices 136 ms
DisplayProgressNotification: Build Failed
Error building Player because scripts have compile errors in the editor
Build completed with a result of 'Unknown' in 0 seconds (0 ms)
Android Extension - Scanning For ADB Devices 151 ms
All compiler errors have to be fixed before you can enter playmode!
Request Asset Garbage Collect because used heap size increased from 207.0 MB to 0.55 GB, exceeding the threshold of 256.0 MB.
Unloading 1 Unused Serialized files (Serialized files now loaded: 0)
Unloading 2109 unused Assets / (7.4 MB). Loaded Objects now: 8457.
Memory consumption went from 0.55 GB to 0.55 GB.
Total: 14.267500 ms (FindLiveObjects: 0.581500 ms CreateObjectMapping: 0.353600 ms MarkObjects: 9.984800 ms  DeleteObjects: 3.346200 ms)

<RI> Initialized touch support.

Hi @zhhqu0305,
The LTS version of the setup tool does not work with older versions of the Unity Editor. Unity does not support opening projects in older version of Unity (e.g 2022.3 LTS to 2022.2).

Were you testing 2022.3.6 with a new project?

I have not been able to reproduce the Vuforia issue. Please make sure that you are using the correct package version of the unity xr package. Please see the attached manifest.json and packages-lock.json file used (2.1 KB)

Yes I created a new project with 2022.3.6. Actually the second time I opened a new project the setup tool got hanged as well.

I tried to import the Unity Example from Magic Leap Hub and the build was successful. But if I use Vuforia's Magic Leap 2 Sample from Asset store it failed as mentioned before. Did you try that one and still cannot reproduce the bug?

I think I have something different in packages-lock.json, but probably due to the fact that I'm using 3.6 while you are using 3.0. I attached it here. (2.1 KB)

Also I don't know why but after "build and run" nothing showed up on Magic Leap 2. Is there any special configuration I should do before running it? The controller just vibrates when I click on the back.

Try checking if you have clicked on the check mark on unity in ML. Check the image below.