在Unity3D传递Camera.MAIN到Android的Java方法 [英] Passing Camera.MAIN in Unity3D to android java method

查看:647
本文介绍了在Unity3D传递Camera.MAIN到Android的Java方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用集成SDK Moodstocks图像识别应用程序,
开始在moodstocks我必须使用surfaceview(相机),所有当我在Eclipse中做它工作正常,扫描仪,但我希望在一种游戏的使用unity3D因为我使它

i'm working on integrating image recognition app using Moodstocks SDK , to start the scanner in moodstocks i must use a surfaceview (Camera) , all works fine when i do it in eclipse , but i want to use unity3D cause i'm making it in a sort of a game ,

所以我做了我的Eclipse项目作为JAR和进口它的团结,我试图从统一脚本中调用我的java类的方法和camera.Main传递给它

so i made my eclipse project as JAR and imported it in unity and i'm trying to call the method in my java class from the unity script and pass the camera.Main to it

所以,如果你能给我有关的任何指引

so if you can give me any guidelines about that

谢谢,

推荐答案

免责声明:我的工作Moodstocks

在Moodstocks SDK中的 ScannerSession 对象为Android的设计是一个高层次的,易于使用的包装,通过利用许多技术性困难护理本身,在一个典型的,的Java应用程序的情况下。特别是,它初始化相机你,previews它提供的 SurfaceView 并调度摄像头帧的Moodstocks SDK。

The ScannerSession object in the Moodstocks SDK for Android is designed to be a high-level, easy-to-use wrapper that takes care of many "technical" difficulties by itself, in the context of a classic, Java app. In particular, it initializes the camera for you, previews it on the provided SurfaceView and dispatches camera frames to the Moodstocks SDK.

我从来没有用过团结自己,所以我不能深入细节,但我认为在你的背景下,鉴于统一有自己的初始化和使用摄像机的方式,你必须绕行这个 ScannerSession 对象,并击中了Moodstocks SDK的较低级别的功能。了解如何获取使用Unity相机帧,手动进他们的Moodstocks SDK 扫描对象。您可以从什么是做灵感 ScannerSession 来看看如何做到这一点!

I've never used Unity myself so I can't dive into the details, but I think that in your context, given the fact that Unity has its own way of initializing and using the camera, you'll have to bypass this ScannerSession object and hit lower-level functions of the Moodstocks SDK. Find how to get the camera frames using Unity, and feed them manually to the Moodstocks SDK Scanner object. You can take inspiration from what is done in the ScannerSession to see how to do that!

希望这有助于!如果您正在寻找更多的意见,您可以要求我们在 Moodstocks帮助中心

Hope this helps! If you're looking for more advice, you can ask us questions on the Moodstocks Help Center

这篇关于在Unity3D传递Camera.MAIN到Android的Java方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆