Unity Crashes When Previewing with Leia SR SDK

Hi there, I just started development using the Leia SR Unity SDK:LeiaUnityPlugin_v3.2.13, I am unable to start the Preview once I have imported the plugin, it crashes even if I do not load the sample scenes. I accept all recommended settings indicated by the Leia pop up. There are no errors in console.
I have tried just run a basic Univeral 3D template scene as well as the model viewer scene, both crash immediatley without any logging messages. Please advise on how to get started, and I apologize in advance if this a rudimentary question. Thank you for your assistance.

Hello Austin,
Could you let me know which version of Unity you’re using? It sounds like the Unity Editor crashes after importing the LeiaUnityPlugin_v3.2.13, even without loading the sample scenes. Is that correct?

We haven’t experienced this issue ourselves, but to help troubleshoot, it would be helpful to retrieve the crash logs from the Unity Editor.

For Windows:

  • Navigate to the crash logs folder:
    C:\Users\[Your Username]\AppData\Local\Unity\Editor
  • Look for the Editor.log file.

Thanks

I am using Unity 2022.3.47f1, please find the Editor log here (I could not upload non-image files) Editor.log.txt

Just to clarify, I am able to import the plugin but once I do so I can no longer use the Preview function (play button in Unity), at this point it closes in any scene (Leia or Sample Unity.)

Thank you so much for your help!

I’m experiencing the same issue. After importing LeiaUnityPlugin_v3.2.13.unitypackage into Unity Editor version 2022.3.51f1 and applying the recommended Unity settings, pressing the play button causes Unity to crash even in an empty sample scene. I’m working on Windows, with SRPlatform v1.30.2 for Win64 installed.

I also tried using other Unity versions, but encountered issues as follows:

-In version 2021.3.45f1, after importing the package, I received this error:
Assets\Leia\Editor\Scripts\Windows\LeiaRecommendedSettings.cs(505,40): error CS0117: ‘PlayerSettings.Android’ does not contain a definition for ‘minifyWithR8’

-In version 2020.3.48f1, the package imported successfully, but after applying the recommended Unity settings, I encountered this error when entering play mode:
DllNotFoundException: SRUnityNative
SRUnity.SRWeaver.CanWeave () (at Assets/Leia/Devices/WindowsSRDevice/Private/Scripts/Modules/SRRender/SRWeaver.cs:70)
SRUnity.SRRender.UpdateModule () (at Assets/Leia/Devices/WindowsSRDevice/Private/Scripts/Modules/SRRender/SRRender.cs:49)
SRUnity.SystemHandler.Update () (at Assets/Leia/Devices/WindowsSRDevice/Private/Scripts/Classes/SRSystemHandler.cs:152)

If you have any suggestions or solutions, I would greatly appreciate it.

Hi @saas,

could you share the log file for the crash occurring with 2022.3.51f1, located in C:\Users\[Your Username]\AppData\Local\Unity\Editor?

The minifyWithR8 issue in 2021.3.45f1 has been recently addressed, and the fix will be included in LeiaUnityPlugin v3.2.14, which will be released soon.

Regarding the issue with 2020.3.48f1, could you check if the SRUnityNative.dll file is present in \Leia\Devices\WindowsSRDevice\Private\Bin?

Thanks

Thank you for your reply.

Here is the log when 2022.3.51f1 crashes.

Regarding 2020.3.48f1, \Leia\Devices\WindowsSRDevice\Private\Bin\SRUnityNative.dll is present.

@saas
Hello Saas,
Could you try our latest Unity plugin (v3.2.14)? You can download it from this link. Please check if the issue has been addressed.
Thanks!

Hello, I think I am experiencing the same issue. I tried many combinations to isolate the issue, but without success. The SDK update seemed to have fix the Unity editor crash on Play, but a similar issue now occurs when running the project once built.

I am on Windows 10. The display is a SpatialLabs ASV15-1B. I downloaded the “Spatial Experience Center” which also bundles the latest SR runtime (1.30.2). I also installed the SR sdk 1.30.2 from the Leia SDK guide, with the SDK option during install.

For the sake of isolating the issue, I created a new Unity 2022.3.51f1 project with minimal setup:

  • imported the latest SDK (version that was suggested: v3.2.14);
  • Applied recommended setting (anisotropy only was listed);
  • Created a new game object and added a LeiaDisplay
  • Added a Sphere game object to have something on camera;

Run from the editor (Play) does work. I see a weaving pattern rendered, but the display does not go in 3D mode.

I built for development. Same issue with release or with script debugging.

When running the build, Unity logo appears as usual, then the display camera indicator light turn on (thats a sign its going in 3d mode), then the app closes.

I’m attaching the player logs here:

Please let me know if you need more information, but I believe you can reproduce with my detailed instruction.

Thank you.

Our latest Unity plugin (v3.2.12 or higher) requires SR Runtime version 1.31.x or later. This updated runtime will be included in an upcoming update and distributed through the vendor’s website in the near future.
In the meantime, could you try using LeiaUnityPlugin version 3.2.11 instead? You can download it from this link:

Thanks.

Thank you for the quick reply. I will try this very soon and get back with results.

Note that based on your instructions, the current “Getting Started” guide is misleading (referencing the SR runtime version 1.30.2):

Thanks, yes using an older SR SDK works.

I’m looking forward for the SR Runtime release. Do you know much time in the future we can expect?