Search Issue Tracker

Won't Fix

Votes

0

Found in

2019.4

2020.2

2020.2.0f1

2021.1

2021.2

Issue ID

1311392

Regression

No

[XR SDK] [Lumin] Magic Leap app fails to start when built from batch mode and Library folder is deleted before build start

XR SDK

-

Reproduction steps:
1. Open the attached project folder ("2019.4.zip")
2. Make sure the Library folder is deleted
3. Open the "build.bat" file and edit settings accordingly
4. Run "build.bat" file
5. Upload built Magic Leap application file to the device and run it

Expected result: App starts and runs
Actual result: App freezes

Reproducible with: 2019.4.21f1, 2020.2.7f1, 2021.1.0b10, 2021.2.0a7
Could not test with: 2018.4.33f1 (Lumin platform not available)

Tested:
- Magic Leap

- When built from Editor, or if Library folder was generated while running the editor and then building via batch mode issue isn't reproducible

  1. Resolution Note (2021.2.X):

    The issue appears to be two-fold; using an obsolete method in the builder script as well as missing a command line option.

    First off, in the Batch file you use to build the is missing the `-buildTarget Lumin` option.

    Therefore, the new batch file would look like this:

    ```
    "C:\<path to unity EXE>\Unity.exe" -batchmode -nographics -buildTarget Lumin -quit -projectPath case_1311392 -executeMethod LuminBuilder.Build -outputPath "C:\<path to mpk output folder>\ml.mpk" -luminSdkPath "c:\<path to lumin sdk folder>\v0.24.0O" -LogFile "C:\<path to output log>log.txt"
    ```

    Secondly, in the ` LuminBuilder.cs` file, you're using an obsolete method, as described here: https://docs.unity3d.com/2019.4/Documentation/ScriptReference/EditorUserBuildSettings.SwitchActiveBuildTarget.html

    You'll want to remove that call from the script, like so:

    ```
    public static void Build()
    {
    // EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Lumin, BuildTarget.Lumin);
    var sdkPath = Parse(LUMIN_SDK_PATH);

    if (sdkPath != null)
    SetLuminSDK(sdkPath);
    ```

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.