位置: 编程技术 - 正文

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

  • 平价转让股权如何做
  • 一般纳税人购进货物用于免征增值税项目
  • 土增税税率和速算例题
  • 为什么增值税不计入营业税金及附加
  • 人工费用的核算例题
  • 公对私转账没有到账怎么查询
  • 会计二级科目是哪个
  • 盈余公积在现金流量表中哪里体现
  • 固定资产的折旧方法一经选定,不得随意变更
  • 代开专票作废退税怎么做账?
  • 转让名额协议
  • 柴油暂估入账
  • 出口货物索赔如何确认收入
  • 当期销项税额等于什么乘以什么
  • 残保金和工会经费
  • 工会经费可以用于哪些支出
  • 无线网连上却上不了网络
  • 电脑无损音乐播放软件哪个最好
  • SQL Server2005、2008如何彻底删除卸载并重新安装?
  • 理财收益的增值怎么算
  • 华为鸿蒙系统看PDF文件会不多次存
  • 加班餐费税前扣除问题
  • 前端解决方案
  • php函数function
  • auepuc.exe是什么软件
  • PHP:php_check_syntax()的用法_misc函数
  • PHP:pg_execute()的用法_PostgreSQL函数
  • PHP:pg_connect()的用法_PostgreSQL函数
  • 员工离职补偿金账务处理
  • 实收资本主要包括哪些
  • nginx配置php项目
  • c++~怎么用
  • 交易性金融资产是什么意思
  • 织梦官方网站
  • 出口退税还需要交企业所得税吗
  • 长期债权投资业务处理
  • sql server5120
  • 新成立公司实收资本没到位该怎么做账
  • 政府会计制度应收账款坏账准备
  • 评估价计入什么科目
  • 实际发的工资跟个人所得税不一样怎么办
  • 施工单位名称变更需不需要单独做一个联络函
  • 产品销售的账务处理办法
  • 律师费能计入办公费吗合法吗
  • 注册资本实缴制改为认缴制
  • 公司房租收据可以入账吗
  • 收款凭证和付款凭证是出纳人员收款、付款的依据
  • 职工教育经费的差旅费可以抵扣吗
  • sqlserver将查询结果作为临时表
  • sqlserver数据库恢复挂起状态
  • win10禁用所有启动项
  • 怎样设置windows不更新
  • u盘ghost装机
  • xp.系统
  • 关闭windows报错
  • 盗版win10可以用win10商店吗
  • win10如何清除系统
  • linux命令怎么用
  • win8任务栏设置在哪
  • w7升级w8.1
  • js面向对象编程实例
  • jQuery+ajax的资源回收处理机制分析
  • nodejs 请求
  • python 入门指南
  • nodemcu web
  • js全选和全不选效果复选框
  • js封装是什么意思
  • [置顶]星陨计划
  • shell脚本遍历文件
  • 浅析jQuery Ajax请求参数和返回数据的处理
  • jquery实现全选
  • jquery滚动条滚动事件
  • 手机安卓版本升级
  • JavaScript Math.round() 方法
  • javascript精度问题的原因
  • 国家税务局开票软件下载
  • 税收六大体系和六大能力基层
  • 个人所得税是按实发工资还是应发
  • 西安税务局服务电话
  • 北京市税务局热搜
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设