位置: 编程技术 - 正文

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移动代码)

  • 自然人收缴税务客户端
  • 非盈利组织确认及所得税汇算怎么做
  • 材料费用发票的记账凭证
  • 代扣个税的会计分录怎么做
  • 购房返现金需要什么资料
  • 固定总价合同中,承包人承担的价格风险
  • 冲红发票怎么写备注
  • 财务合理化建议例子
  • 如何核销财政票据的发票
  • 接受捐赠的材料会计分录怎么写
  • 收到假钱的会计分录
  • 购买设备的增值税是支出吗
  • 转让境外股权损失能否税前扣除
  • 交社保公积金需要劳动合同吗
  • 偿还借款利息是现金流量什么项目
  • 1697509029
  • 腾讯手游助手怎么卸载
  • 本期已缴税额不能大于本期应纳税额
  • 用后期进项抵欠怎么做账
  • 应付职工薪酬账户结构
  • 退款给客户怎么写分录
  • mac电脑command+s
  • vscode国内镜像
  • kb4586819更新
  • 安保费差额纳税是什么意思
  • 应付债券借贷
  • 境外所得抵扣税怎么申报
  • windows无法验证显卡驱动的数字签名
  • vue前端开发规范
  • PHP:diskfreespace()的用法_Filesystem函数
  • 储金会是干什么的
  • php调用图片
  • 委托贷款业务是资产业务吗
  • php注册功能的实现
  • php写json
  • 异地工程款预缴
  • 盘点那些神级翻唱现场
  • 前端如何将项目分类
  • 一文详解卡尔曼人物形象
  • 命令行窗口
  • 一次性伤残就业补助金
  • 研发费用如何做加计扣除
  • 年报和汇算清缴报表口径的区别
  • 法人给对公账户转账
  • 物业费可税前扣除吗
  • 税控系统技术维护费全额抵扣分录
  • 预收工程款的会计分录
  • 增值税专用发票抵扣期限
  • 留底税额账上怎么体现
  • 退休人员基本养老金包括哪些
  • 财务收入支出明细表
  • 扣缴个人所得税怎么计算
  • 企业接收到政府信息
  • 社保逾期滞纳金和利息
  • 商品的结构
  • 盘亏机器设备
  • 增值税普通发票怎么开
  • 管理费用里包括哪些费用
  • 未达到起征点的税金怎么做凭证
  • 社保系统个人信息
  • 长期股权投资损益调整怎么回事
  • 混合销售行为征收增值税
  • 结账时怎样根据日期填写
  • sqlserver删除数据语句
  • windows10cortana搜索框
  • broadcom网卡配置
  • 超级简单的方法
  • u启动开机启动快捷键
  • gnome版本
  • unity 3d数学
  • style=display:inline
  • 根据安全生产法的规定,生产经营单位
  • ajax请求图片并显示
  • chrome调试js
  • python代码规范化
  • 税务人员廉洁自律承诺书
  • 国家个税app讨要工资流程怎么操作
  • ca登陆
  • 云南地税局官网
  • 购买增值税发票税务局打电话来问怎么处理?
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设