位置: 编程技术 - 正文

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

  • 所得税汇算资产总额怎么算
  • 印花税一般计入管理费用
  • 小规模商贸公司没有进项可以开发票吗?
  • 机械设备租赁印花税谁交
  • 小企业无形资产取得的账务处理
  • 未确认融资租赁费用是什么类型科目
  • 房地产结转收入是什么意思
  • 停产期间产生的费用怎么处理?
  • 工资中的考核罚款会计怎么处理?
  • 假的手撕票已经入账了怎么办?
  • 个人独资企业优缺点有哪些
  • 发票申领需要什么资料
  • 企业所得税是按季度还是按月
  • 基金会可以投资企业吗
  • 暂估发票未到年报怎么调
  • 外挂项目跨年结转分录怎么做?
  • lec风险评价方法
  • 电子发票怎么开具流程
  • 技术服务费成本票是什么
  • 间接补贴主要包括
  • 租用办公室协议书
  • 政府会计财政拨款收入借贷方向
  • 公司新增注册资本
  • 季节性停工是什么
  • 关于工程施工的劳动法规
  • php如何实现多进程
  • 安置房项目需要环评吗
  • 系统之家哪个系统比较好用
  • macwifi配置
  • 股权转让合同怎么解除
  • PHP:stream_context_create()的用法_Stream函数
  • 修建污水处理厂施工方案包括哪些内容
  • 销售无形资产增值税税率2022
  • 作废的普通发票,顾客联拿不回来
  • 企业缴纳职工社保政策
  • 个人独资企业和合伙企业的区别
  • 总部资产减值会考吗
  • 会计核算方法体系构成
  • php array_search二维数组
  • 低调低调
  • 城镇土地使用税减免税政策
  • 返聘人员的工资需要交税吗?
  • 已经提完折旧的房产价值评估
  • 汽油费入什么会计分录
  • 海关缴款书能重开吗
  • 小规模首次申请发票张数
  • 电子税务局如何添加办税人员
  • 电子汇票提示付款申请
  • 抵扣税款
  • 虚开发票要如何处理?
  • 核定征收的一般纳税人进项税额抵扣
  • 投资损益科目
  • 支付上月采购货款
  • 案例分析应收账款管理存在的问题
  • 对公网银回单可以导出吗
  • 固定资产计提折旧的方法
  • 触发器中instead of
  • winxp系统打不开
  • 电脑的技巧
  • macbookzen
  • centos6关闭图形界面
  • 在windows xp的应用程序中,经常有一些
  • 2020win7免费升级win10教程
  • 如何判断电脑是不是linux
  • cocos2dx 4.0
  • 怎么理解python
  • 获取nodejs命令行信息
  • 网页javascript错误
  • linux开机启动进程
  • android!
  • javascript教程完整版
  • jquery判断是否有某个class
  • 一个治疗Unity的Prefab强迫症患者的小招(Prefab变成红色的问题)
  • jquery获取页面元素
  • 交通运输业的税率9%和13%
  • 广东省电子税务局app下载官网
  • 朝阳区第六税务所
  • 船舶吨税多少天缴纳一次
  • 省税务局属于什么级别
  • 中山税务如何预约
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设