Skip to content

Unity keeps crashing with the Run the scene #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shahanhyperspace opened this issue Sep 27, 2024 · 8 comments
Open

Unity keeps crashing with the Run the scene #6

shahanhyperspace opened this issue Sep 27, 2024 · 8 comments

Comments

@shahanhyperspace
Copy link

shahanhyperspace commented Sep 27, 2024

I imported both OpenCV and the Yolo package in Unity, didnt get any errors which was amazing.

I tried to run the scenes in the folder "YOLOv8WithOpenCVForUnityExample" but all of them keep crashing as soon as I run them.

Any suggestions why?

For Open CV, I have the latest package from the asset store. Same for Yolo the latest one. Running this on Windows.
My unity version is: 2022.3.45f1

@EnoxSoftware
Copy link
Owner

What is the Yolo package you imported?

@shahanhyperspace
Copy link
Author

shahanhyperspace commented Sep 30, 2024

I am using the latest version
YOLOv8WithOpenCVForUnityExample_v1.0.5

I have tried with different versions of unity as well still crashing

@shahanhyperspace
Copy link
Author

shahanhyperspace commented Sep 30, 2024

I think i know what could be the cause of the crash, Unity is trying to get access to the camera and its not getting access to it.
I have also tried to make a windows build and test, still the same crash.
I have also noticed that I dont get any pop-up notification to access the camera in the build? I have tried the webgl build and on the browser it does ask for permission for the camera.

Do anyone know how to fix this? running this on windows and making a build on windows as well

@EnoxSoftware
Copy link
Owner

We have tested it in our environment and have never encountered any crashing errors.
Windows editor and the latest OpenCVForUnity2.6.3 with YOLOv8WithOpenCVForUnityExample_v1.0.5.
And does one of the example scenes included in the assets, “Basic/WebCamTextureToMatHelperExample” work correctly? If it is a camera access issue, I would expect a similar error.

@shahanhyperspace
Copy link
Author

shahanhyperspace commented Sep 30, 2024

Yes its the same for this scene as well
Every other scene works perfectly, where there is no access to a camera.

error.mp4

@EnoxSoftware
Copy link
Owner

This is a test environment that has been verified to have no problems.
OS: Windows10
UniryEditor: Unity2022.3.45.f1
OpenCVForUnity: 2.6.3

Since accessing the camera seems to induce a crash, could you try a simple WebCamTexture test like the code below?
https://docs.unity3d.com/ja/2021.1/ScriptReference/WebCamTexture.Play.html
Since it is possible that the problem is not related to our plugin.

@shahanhyperspace
Copy link
Author

You are correct, there is some issue with webcamtexture.
I have tried it on a different PC, its the same issue.

@shahanhyperspace
Copy link
Author

How to use Video source from outside Unity

I have a video playing in another software, I am getting the video feed in unity using NDI/Spout.
https://github.com/keijiro/KlakNDI

I am currently using the scene where I am just using a pre recorded video. The video I am receiving in unity is playing on a quad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants