- Home /
Unity 4.5 subview on Android with OpenCV
I am trying to implement a Unity subview that draws objects over some camera frames captured by OpenCV. I am following this link and this steps, creating a FrameLayout, and attaching the GLSurfaceView object. However, since 4.3, the UnityPlayer class does not allow this, and therefore I am not able to display the Unity subview over my camera frames (I'm using OpenCV's JavaCameraView to display them on the layout). Has anybody find this problem with Unity 4.5? I'd really appreciate your help with this. Here is a bit of the code:
glView = new GLSurfaceView(this);
glView.setEGLContextClientVersion(2);
glView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
glView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
glView.setRenderer(mUnityPlayer); //This is not allowed anymore. It gives a compilation error
I have seen people extending the UnityPlayer class. However, I face some difficulties with that too.
Your answer
Follow this Question
Related Questions
Face Tracking using openCV is not working accurately 0 Answers
Is there any way to create a transparent view on Android? 0 Answers
OpenCV - Mobile Devices Query 0 Answers
UnityPlayer as a SubView with Transparent Background? 4 Answers
Android Plugin | How to get FragmentManager from currentActivity 1 Answer