位置: 编程技术 - 正文

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

  • 财税201920号文件解读
  • 车船使用税会打折么
  • 政府的慰问金一般有多少钱
  • 先收到发票还未付款怎么做账
  • 分公司注销后账户不注销可以吗
  • 企业所得税准予扣除
  • 个税申报包含哪些
  • 个人钱转入对公账户账务处理
  • 金税三期个人所得税怎么下载
  • 货物已到发票未到怎么做账
  • 以旧换新要按商品价格吗
  • 无形资产摊销可以按照其价值和使用情况
  • 银行摘要冲账是什么意思
  • 购物卡消费后不给开票
  • 药品增值税简易征收
  • 税控盘上报
  • 公转私限额多久自动解冻
  • 收到的产品返利怎么做账
  • 给法院交的诉讼费怎么交
  • 民办非企业单位信息
  • 银行利息为什么只算10个月
  • php开发的优点与不足
  • uniapp小程序自定义tabbar在iOS手机上太高了
  • 不征税收入有哪些条件
  • PHP:base64_decode()的用法_url函数
  • 河马是站在睡觉吗
  • 华侨是否适用个人所得税
  • 除湿器属于固定资产什么类别
  • 蓝桥杯真题c语言
  • js去掉数组中的空字符串
  • node教程
  • 自动驾驶感知算法
  • laravel5创建service provider和facade的方法详解
  • 应收账款与主营业务收入的比率
  • 企业印花税的申报
  • 行政单位预算外收入有哪些
  • 纸质增值税专用发票申领
  • 个体经营所得税核定征收2023税率
  • 自己动手把桌子改窄
  • MySQL进阶SELECT语法篇
  • 拍卖车牌收入需要缴纳什么税
  • 非营利组织接受捐赠收入要交企业所得税吗
  • 划拨的土地出租
  • 在建工程领用原材料税费怎么处理
  • 奖金偶然所得税起征点
  • 出口退税申报分录怎么写
  • 实际费用以什么为准
  • 结转销项税额至未交增值税的结转系数
  • 其他应收款余额在贷方什么意思
  • 员工异地工作
  • 新单位年终工作总结
  • 小企业如何做
  • linux谷歌浏览器安装指令
  • fedora soas
  • 如何用u盘装系统 知乎
  • windows8怎么设置
  • 如何将windows 7升级到windows 10
  • xp停在windows界面
  • win10系统预览版
  • linux如何操作数据库
  • win8系统升级后怎么退回
  • Win7系统打开D盘文件后怎么没有后退箭头
  • 2016年Win10 RS1预览版11095已送交合作伙伴
  • jquery动画库
  • 批处理删除空文件夹
  • 骨骼动画程序设计
  • js中document.write
  • python里面有什么
  • nodejs require原理
  • 狗刨好学吗
  • python常见的格式化输出小结
  • html购物网站
  • python数字类型及操作
  • 安卓自定义动态壁纸
  • unity3d文件怎么查看和修改
  • A级纳税人和一般纳税人区别
  • 金税盘电子发票怎么开
  • 车船税保险公司代收代缴后,单位还申报不?
  • 物业管理用房如何缴纳房产税
  • 北京市地方税务局
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设