Skip to content
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

Running examples in unity gives error #9

Closed
ashrvstv opened this issue Sep 21, 2020 · 12 comments
Closed

Running examples in unity gives error #9

ashrvstv opened this issue Sep 21, 2020 · 12 comments
Assignees

Comments

@ashrvstv
Copy link

Getting error while running example

DllNotFoundException: mediapipe_c
Director.OnDisable () (at Assets/Mediapipe/Examples/Scripts/Director.cs:35)

Screenshot from 2020-09-21 23-37-15

Steps to reproduce

step 1- git clone MediapipeUnityPlugin
step 2 - open in unity
step 3 - run HandTrackingGPU scene

@homuler homuler self-assigned this Sep 21, 2020
@homuler
Copy link
Owner

homuler commented Sep 21, 2020

You need to identify what causes the DllNotFoundException.
Will you try checking (or unchecking) Load on startup in Plugin load settings section?

Screenshot_20200922_084819

@ashrvstv
Copy link
Author

ashrvstv commented Sep 22, 2020

@homuler i think it is not even present at the path Assets/Mediapipe/SDK/Plugins/
How can I add that ?

Screenshot from 2020-09-22 15-03-20

@homuler
Copy link
Owner

homuler commented Sep 22, 2020

Well, it surely exists in the above screenshot. libmediapipe_c.so is that.

@ashrvstv
Copy link
Author

ashrvstv commented Sep 22, 2020

Yeah, my bad.

Will you try checking (or unchecking) Load on startup in Plugin load settings section?

@homuler I tried this. its not working in either case.

On enabling

Screenshot from 2020-09-22 18-19-56

On disabling

Screenshot from 2020-09-22 18-20-59

Screenshot from 2020-09-22 18-21-07

Screenshot from 2020-09-22 18-21-17

@homuler
Copy link
Owner

homuler commented Sep 22, 2020

OK. Please check Load on startup, click Apply button, and restart Unity Editor.
I expect some warning logs will show up in the console when Unity Editor starts.
Screenshot_20200922_221449

By the way, if you use Debian or Ubuntu, and your OpenCV's shared object files are installed under /usr/lib/x86_64-linux-gnu/, then you may need to edit opencv_linux.BUILD. (cf. https://github.com/homuler/MediapipeUnityPlugin#opencv)

@ashrvstv
Copy link
Author

if you use Debian or Ubuntu, and your OpenCV's shared object files are installed under /usr/lib/x86_64-linux-gnu/

I have modified opencv_linux.BUILD

Screenshot from 2020-09-22 22-42-02

@ashrvstv
Copy link
Author

But same problem is here,

I expect some warning logs will show up in the console when Unity Editor starts.

Yeah right

Screenshot from 2020-09-22 23-04-43

on disabling the setting there is no warning at start
Screenshot from 2020-09-22 23-05-29

but showing same error at runtime
Screenshot from 2020-09-22 23-05-57

@homuler
Copy link
Owner

homuler commented Sep 22, 2020

#2 (comment) may be relevant.

But same problem is here,

I expect some warning logs will show up in the console when Unity Editor starts.

Please copy and paste that warning log in text.
I know it continues to fail, I'd like to know why it fails.

I have modified opencv_linux.BUILD

After editing, did you run make, make install and restart Unity Editor?
This file is not read at runtime. If it is not correct at build time, OpenCV will not be linked.

@ashrvstv
Copy link
Author

After editing, did you run make, make install and restart Unity Editor?

@homuler it worked after i run make and make install command and restart unity.

@ashrvstv
Copy link
Author

ashrvstv commented Sep 23, 2020

@homuler it is running on Unity at (PC, Mac & Linux Standalone platform) but when i am trying to build android apk file at (Android Platform). it is giving following errors

Assets/Mediapipe/Examples/Scripts/Director.cs(7,31): error CS0234: The type or namespace name 'Windows' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

Error building Player because scripts had compiler errors

Build completed with a result of 'Failed' in 6 seconds (6063 ms)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002af] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Screenshot from 2020-09-23 12-31-54

@homuler
Copy link
Owner

homuler commented Sep 23, 2020

I'm planning to support Android, but currently Linux Desktop is the only supported platform (this error may not be relevant though).
#3

@ashrvstv
Copy link
Author

okay @homuler , waiting for android support, btw, thanks for your help.

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