stereolabs / zed-unity

ZED SDK Unity plugin
https://www.stereolabs.com/documentation/guides/using-zed-with-unity/introduction.html
MIT License
243 stars 57 forks source link

Unity Crashes when I import Package #265

Closed zacharyyamaoka closed 9 months ago

zacharyyamaoka commented 10 months ago

Preliminary Checks

Description

When I import the ZED unity package, I first get an error regarding no xr mangement etc.

I install the XR mangement plugin and then some errors appear in the console and then the project crashes!

Errors seem related to ZEDRenderingPlane.cs -

one says: AspectRatio is obsolete: AspectRatio enum has been deprecated and its functionality has been removed WhatsApp Image 2023-08-13 at 18 50 47

Seems problem has to do with these lines in ZEDRenderingPlane.cs:

if UNITY_EDITOR

    UnityEditor.PlayerSettings.SetAspectRatio(UnityEditor.AspectRatio.Aspect16by9, true);
    UnityEditor.PlayerSettings.SetAspectRatio(UnityEditor.AspectRatio.Aspect16by10, false);
    UnityEditor.PlayerSettings.SetAspectRatio(UnityEditor.AspectRatio.Aspect4by3, false);
    UnityEditor.PlayerSettings.SetAspectRatio(UnityEditor.AspectRatio.Aspect5by4, false);

endif

Steps to Reproduce

Create new URP project in Unity 22.3.6f1 Import ZED Unity Package Install XR Mangement

Expected Result

Project to stay open and to be able to run the samples

Actual Result

Unity Crashes

ZED Camera model

ZED Mini

Environment

OS: Windows
SDK: 4.0
GPU: 1060
CUDA: 12

Anything else?

Your help with this matter will be greatly appreicated!!!

Bvallon-sl commented 10 months ago

Hi,

What you see here are warnings, not errors, that's not what is causing the crash.

Can you tell me what SDK and unity plugin versions are you using please?

zacharyyamaoka commented 10 months ago

I am using the most recent ZED SDK from the downloads page:

CUDA 12 ZED SDK for Windows 10/114.0

I am using the Zed_Unity_Plugin_v4.0.5.unitypackage

as the the most recent .unitypackage was not avaliable, I will try agian now with the newest unity package,

Thank you so much for the fast reply!

Zach

zacharyyamaoka commented 10 months ago

I tried with the newest unity plugin 4.0.6 at it didn't crash! Will keep you posted

zacharyyamaoka commented 10 months ago

When I create a URP template project, and run a scene with just the ZED_Rig_Mono, the game screen is pink.

When I create a HDRP template project, and run a scene with just the ZED_Rig_Mono, then the camera shows.

I was planning to use URP as I wasn't planning on doing any hyper realistic graphics, please advise! thank you : )

samphilips commented 10 months ago

I am facing the same issue, the unity crashes when I try to install the XR plugin , I am using 4.0.5 plugin, windows 11 , cuda 12.1

zacharyyamaoka commented 10 months ago

I am facing the same issue, the unity crashes when I try to install the XR plugin , I am using 4.0.5 plugin, windows 11 , cuda 12.1

@samphilips try with the new 4.0.6 plugin!

samphilips commented 10 months ago

I am facing the same issue, the unity crashes when I try to install the XR plugin , I am using 4.0.5 plugin, windows 11 , cuda 12.1

@samphilips try with the new 4.0.6 plugin! still facing the same issue even with 4.0.6 plugin :( , could you please let me know what version of unity you are using currently. I am using 2022.3.7f1 and using unity HUB version of 3.5.0

EDIT: it works fine when I downgraded my system to windows 10 from windows 11

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days