如何为Vuforia/Unity创建AR标记? [英] How do I create an AR marker for Vuforia / Unity?

查看:396
本文介绍了如何为Vuforia/Unity创建AR标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我知道的一个非常基本的问题(!),但是如何创建AR标记并将其导入Unity?我知道我应该通过Vuforia标记管理器页面来完成此操作.我已经创建了目标数据库并下载了数据库,但是如何获得在Unity中显示的标记?

This is a horribly basic question I know (!) but how do I create and import an AR marker into Unity? I know I am meant to do it through the Vuforia Marker Manager page. I have created a Target Database and I have downloaded the database, but how do I get the marker to display in Unity?

另外:目标数据库到底是什么?那是标记"的别称吗?

Also: what exactly is a Target Database? Is that another name for 'marker'?

推荐答案

要专门回答您的问题,是的,标记是您的目标.

To answer your question specifically, yes your Marker is your Target.

所以您需要做的是:

  • Go to License Manager. Add a License Key choosing None as your License plan.

现在转到 目标管理器 .创建一个Database并从下拉列表中为其添加许可证.

Now go to Target Manager. Create a Database and add the license for it from the drop down.

添加目标,然后从计算机中选择要用作标记的图像,然后上载它.

Add Target, and select from your computer the Image that you want to be the Marker, and upload it.

一旦目标状态变为活动状态,您可以单击下载数据库,并确保单击For UnityEditor.这会下载.unitypackage

Once the status of the Target changes to active you can click Download Database and make sure you click For UnityEditor. This downloads a .unitypackage

现在在Unity中,转到> Import New Assets...并找到您下载的.unitypackage

Now inside Unity, go to Assets>Import New Assets... and locate to the .unitypackage you downloaded

这是您导入数据库的方式.

This is how you import your database.

如果您尚未导入Vuforia程序包Unity Extension,则您可以 只需从 下载 部分下载并导入 通过> > Custom Package

If you haven't Imported the Vuforia package Unity Extension then you simply need to download it from the Downloads section and Import it through the Assets>Import Package> Custom Package

  • 现在理想情况下,要使用AR,您可以使用AR Camera,它位于> PrefabsAssets栏中.将ARCamera拖到您的场景上.

    • Now ideally to work with AR, you would use the AR Camera, which is located in your Assets Bar in Qualcomm Augmented Reality>Prefabs. Drag ARCamera onto your scene.

      Hierarchy中选择了AR Camera的情况下,查看Inspector选项卡.您会看到Data Set Load Behavior.在此之下,您应该看到导入的yeier的.unitypakage的名称.检查名称并将其命名为Active.

      With the AR Camera selected in the Hierarchy look at the Inspector tab. You'll see Data Set Load Behavior. Under that you SHOULD see the name of the .unitypakage you imported ealier. Check the name as well as make it Active.

      现在在> Prefabs中,您还应该看到Image Target.并将其也拖到屏幕上.

      Now in Qualcomm Augmented Reality>Prefabs you should also see Image Target. Drag that onto the screen as well.

      Hierarchy中选择了ImageTarget的情况下,查看Inspector应该是Image Target Behaviour

      With the ImageTarget selected in Hierarchy look at the Inspectorthere should be Image Target Behaviour

      填写如下

      Type: Predefined
      Data Set: <Name of imported .unitypackage>
      Image Target: <Name of Picture uploaded into the Database>
      

      现在,您可以根据应用程序要求解决Image Target.

      Now you may work around the Image Target as per your app requirement.

      注意:在许可证管理器中,单击许可证名称,然后单击确定". 您会看到一个字母数字代码.复制该代码,然后在 AR Camera的检查器,位于QCAR Behaviour>App License Key下 粘贴代码.必须这样做才能使您的应用在您的>设备上正常工作.

      NOTE: In the License Manager, click on the Name of the License and you'll see a Alpha-numeric code. Copy that code, and within the Inspector of the AR Camera, under QCAR Behaviour>App License Key paste the code in. This must be done in order for your app to work on your > device.

      希望这对您有所帮助.请随时问我.

      Hope this helps you. Please feel free to ask me if anything.

      这篇关于如何为Vuforia/Unity创建AR标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆