位置: 编程技术 - 正文

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

  • 公司股东变更需要本人到场吗
  • 培训机构财务怎么做账
  • 应征增值税不含税销售额(3%征收率)怎么填2020年
  • 一般纳税人加计抵减申报表怎么填
  • 计提高温补贴会计分录
  • 房产税细节
  • 一般纳税人旅游服务差额征税税率
  • 公司客车高速费如何抵扣进项税?
  • 营改增后租金如何交税
  • 地方水利建设基金税率
  • 免征残保金还需交税吗
  • 个体工商户允许哪些经营范围
  • 车辆处置入账价值包括哪些
  • 个税经营所得预扣预缴
  • 软件企业超税负率怎么算
  • 免税单位出租房产如何缴纳房产税
  • win11和win10比较
  • 公司支付的赔偿金要扣税吗
  • win10怎么设置硬盘为第一启动项
  • 处理固定资产的账务处理
  • php日历如何实现
  • fatal error: opencv/cv.h: 没有那个文件或目录 错误;fatal error: opencv2/contrib/contrib.hpp: 没有那个文件或目录,opencv多版本
  • vue调整图标大小
  • 遇到的问题及解决方法
  • css flaot
  • 进项发票认证后怎么做账
  • 临时用工账务处理流程
  • 商品销售税金及附加包括哪些
  • 国家税务总局关于个人因解除劳动合同
  • mac环境搭建
  • phpforeach
  • ajax获取php数据
  • python3.9怎么清屏
  • 建筑行业预交增值税税率是多少
  • 暂估入库成本结转处理低于实际成本怎么办
  • 企业其他应付款余额非常大的原因
  • 改造后的固定资产入账价值
  • access使用查询向导固定常数
  • mongodb好用吗
  • mongodb skip数据量大
  • 好用的测试工具
  • 工伤报销计入什么科目
  • 业务招待费报销制度及流程
  • 应收账款账龄计提坏账比例
  • 商品损耗科目
  • 植物售卖
  • 应付账款期初期末
  • 城建税教育费附加什么时候交
  • 固定资产收购方案案例
  • 公司送客户的礼品账务处理
  • 基本户转到一般户用途写什么
  • 专用发票过期未认证最新规定
  • 收到的稳岗补贴要交企业所得税吗
  • 季度现金流量表本期数和上期数
  • 账簿凭证管理的内容
  • sql批量替换字符串
  • ubuntu16.04终端在哪
  • java操作windows的文件管理器
  • windows开发是什么
  • win7系统怎么把c盘的内存加到d盘
  • windows8装.NET 3.5时出现0x800F0906错误解决方案
  • win8.1网络设置
  • win8系统优化
  • win1021h2正式版
  • 2016年Win10 Mobile红石更新抢先看 预期新功能/发布时间表
  • win10的蓝屏界面
  • linux网络聚合
  • cocos2dx4.0教程
  • 浅析科学发展观的核心立场
  • linux中wget命令出现错误
  • linux常用shell操作指令
  • 10个JavaScript中易犯小错误
  • unity3d mod
  • 如何查政审合不合格
  • 四川国家税务局官网
  • 亚马逊墨西哥站扣款20
  • 我国就业制度的演变
  • 坚持问题导向的前提是
  • 公共基础设施项目所得税优惠目录
  • 企业应交个人所得税分录
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设