位置: 编程技术 - 正文

Vuforia How To Use Android Plugins in Unity Apps

编辑:rootadmin
How To Use Android Plugins in Unity Apps

推荐整理分享Vuforia How To Use Android Plugins in Unity Apps,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

Vuforia How To Use Android Plugins in Unity Apps

This article explains how to do two things:

Take custom Android plugins that are written in Java and integrate them into a Vuforia-based Unity projectInvoke methods defined in the Java plugin from a Unity C# script.The Image Targets sample is a starting point for a Unity project example.Integrate plugins into a Vuforia-based Unity projectCreate a Unity project. For ease of reference we refer to it as QcarWithPlugin.Import the Image Targets sample package for Unity(Menu > Assets > Import custom package)Double-click the Image-Targets scene in the project view. The three Image Targets and their associated teapot models should appear in the scene view.Create a new Android project in Eclipse. For ease of reference the project is called MyPlugin, so it is assumed that the main activity will be called MyPluginActivity.Right-click on the project in Eclipse, go to Properties > Java Build Path > Libraries. Add the following two libraries as external jars (both located under the Assets/Plugins/Android/ folder of the Unity project):QCAR.jarQCARUnityPlayer.jarOpen the MyPluginActivity.java file in Eclipse, and make the following code changes:Make MyPluginActivity extend QCARPlayerActivity instead of Activity. Press Ctrl-Shift-O to adjust the imports automatically.From the onCreate() method, remove the line setContentView(…).Add a custom public method called showMessage() to the MyPluginActivity class. Fill the method with some code to display a Toast message with text.The code of your MyPluginActivity should look like the following code:Invoke methods defined in the Java pluginRight-click on your project, go to Properties > Android, and check the IsLibrary checkbox to turn your Android project into a library.This action should make Eclipse generate a .JAR file (for example, myplugin.jar) and store the file in the /bin folder of your Eclipse project.Open the /bin folder and copy the JAR library from that folder to the Assets/Plugins/Android/ folder of your Unity project.Open and edit the AndroidManifest.xml file located in the same Assets/Plugins/Android/ directory.Replace the name of the main activity with your fully qualified Activity name, for example, com.my.org.MyPluginActivity.Create a C# script, call it MyPluginCaller, for example, and attach it to each of your Image Targets in the scene (Chips, Stones, Tarmac, etc.).Copy and then paste the following code in your script. The code will make your script invoke the showMessage() method of your MyPluginActivity class whenever a target is detected:Now the project should be ready to build and run on your Android device.原文地址点击这里

unity3d移动平台减小安装包大小专题(5):共用动作文件 以前就觉得很多武将的动作其实差不多,例如受击,死亡,但鉴于武器不同,就没处理,而且只是共用一两个动作带来的性价比不高。但最近来的小兵

Unity3D定时器的调用 转载自:

【北漂勇士】利用unity和NGUI开发一个RPG类型的游戏 我计划从明天开始,额,是从今天开,始,大概用一学期的时间开发一款角色扮演类型的游戏,作为我将来找工作时展示的作品吧,我特意找到了《dunge

标签: Vuforia How To Use Android Plugins in Unity Apps

本文链接地址:https://www.jiuchutong.com/biancheng/382564.html 转载请保留说明!

上一篇:Unity3D中的Prefab使用方法(unity preferences)

下一篇:unity3d移动平台减小安装包大小专题(5):共用动作文件(unity3d移动代码)

  • 流转税包括哪些税种2022
  • 调研费用怎么写
  • 增值税无票收入可以抵扣
  • 公司全部股权转让流程
  • 销售20万需要多少进项
  • 资产评估费怎么收
  • 会计科目生产成本怎么算
  • 汇算清缴a107020表
  • 领用本企业生产的水泥用于在建工程
  • 商业企业销售的产品
  • 产品成本核算方法体系的内容包括
  • 商场做促销
  • 出口货物的进项发票什么时候认证
  • 存货周转率 高
  • 企业优化什么意思
  • 固定资产机械设备
  • 购进原材料验收入库,贷款商业汇票结算
  • 企业减免6%的税的营业范围有哪些?
  • 投资收益会计处理
  • 专用发票与普通发票代码区别
  • 子公司具有独立的法律地位吗
  • 政府回收土地要交土地增值税吗
  • 月末在产品直接人工成本怎么算
  • 清算中无法偿还的债务
  • 新手应该怎么样
  • Yii2隐藏frontend/web和backend/web的方法
  • 如何设置谷歌浏览器语言为中文
  • PHP:pg_get_pid()的用法_PostgreSQL函数
  • 安代驾给我发短信
  • 天竺葵的养殖方法和繁殖方法
  • 营业外收支的内容
  • chrome浏览器清除数据
  • 建设项目罚款支出的会计处理
  • 应收账款管理费会计分录
  • 全网最新的暗号
  • 花雕典故
  • react_router
  • php session跨域共享
  • 微擎框架是开源的吗
  • 车间打杂工
  • 中华人民共和国禁毒法第十三条规定
  • 最新税法规定小车折旧年限
  • 个税申报漏报人怎么办
  • 出纳报销时应注意什么
  • mysql启动器
  • 盈余公积提取后需要结转吗
  • 模板的固定
  • 建筑公司跨区域经营预缴
  • 报废产品账务的处理方法
  • 发票已认证次月退回
  • 检测费用开票税率
  • 物业公司收到维修基金会计分录
  • 资产减值损失和资产减值准备的区别
  • 发票内容可以写工程款吗
  • 营业费用和营业支出
  • 所有者权益的概念和特征
  • 融资租赁怎么开收据
  • win7 mysql5.7.21安装
  • sql删除重复数据只保留一条日期最大的
  • java下一页
  • win10怎么用键盘重启
  • windows10下软件的app
  • 字符集 linux
  • spyagent4.exe - spyagent4是什么进程
  • hpl是什么文件
  • win10 mobile 1709
  • windows 10微软
  • nodejs异步处理执行顺序
  • nodejs项目搭建
  • div+css布局是什么
  • shell脚本输出空格
  • 开发Blog整理
  • 怎么打印纳税申报表带章的
  • 广东省电子税务局官网登录入口
  • 在企业内部具有行使否决权的是
  • 如何异地代缴社保
  • 五联发票每一联的作用
  • 四川农村信用社电话
  • 什么是重点群体
  • 税务局社保服务
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设