位置: 编程技术 - 正文

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

  • 资产组可收回金额包含商誉吗
  • 个税申报人员多怎么申报
  • 增值税票购买份数满了怎么办
  • 厂房设计费计入在建工程吗
  • 百旺税控盘汇总表怎么看
  • 零申报资产总计不能为零
  • 支付给外包公司的工资备注怎么写
  • 所得税费用在利润表中应在税金及附加项目中填列
  • 自然人扣缴是什么意思
  • 餐费可以抵扣吗
  • 过路费可以入账吗
  • 已开发票查询不到怎么回事
  • 广告业务增值税税率
  • 卷烟消费税纳税环节有几个
  • 软件企业即征即退账务处理
  • 房产税房产原值包括地价吗
  • 制造企业售后服务方案
  • 存款利率怎么算存一年后的金额
  • 分公司借款给总公司
  • 员工社保异地缴纳
  • 取得拍卖的固定资产
  • 家电折旧费法律依据
  • 股东未发工资可否提出仲裁
  • 小规模纳税人纳税申报时间
  • 购进原材料没有发票怎么办
  • 成本计算错误如何应对
  • 银行与银行之间转账会计摘要
  • 如何批量更改多个excel内容
  • 异地工程预缴增值税怎么计算
  • php统计当前在线人数
  • php快速查找
  • 制造费用主要包括哪些费用
  • linux mib
  • 前端项目中遇到的最大困难,怎么解决的
  • 增值税直接减征的开什么发票
  • 交易性金融资产包括哪些项目
  • layui iconfont
  • 收车船税是什么
  • 基建费用如何摊销
  • 关于php文件的自动播放
  • 如何在idea中创建xml
  • zarchiver 小米
  • 销售旧货怎么填写申报表
  • 账实不符的后果和对策
  • 织梦如何开启会员功能
  • 劳务是什么单位
  • mysql load local
  • 固定资产报废账面价值
  • 开办费新会计准则
  • 广告公司制作警车违法吗
  • 增值税免抵退税和免退税的区别有什么?
  • 税控设备抵减增值税金额
  • 计提工资申报个税
  • 金税盘可以用热点吗
  • 农村会计记账实例
  • 会计年初如何轻松工作
  • sql常用语句大全简书
  • linux系统常用命令怎么记住
  • win7系统隐藏文件夹怎么取消隐藏
  • 电脑开机后显示xp界面后一直是黑屏状态
  • Ubuntu安装VMware tools
  • win8系统怎样关机
  • win7怎么设置网速限制
  • windows7的开机启动项在哪里
  • windows免费升级win10
  • shell命令windows
  • 如何将windows 10
  • 使用jquery
  • css隐藏显示元素的方法
  • cocos2dx 不规则按钮的实现
  • cocos2dx官方教程
  • javascript的描述
  • 如何把多个文本文档合并成一个且分行不重叠
  • linux的cp和mv
  • javascript基础教程pdf下载
  • python排序算法比较
  • python循环语句中提前结束本层循环
  • 小规模企业所得税怎么算
  • 消费税的税收优惠政策导向
  • 收讫付讫是什么意思
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设