资源简介
直接把该文件里的HelloAR.unity使用Unity打开,即可,就可以导出一个APP,安装到手机了。使用方法,请参考:http://blog.csdn.net/tiandixuanwuliang/article/details/58707338
代码片段和文件信息
/**
* Copyright (c) 2015-2016 VisionStar Information Technology (Shanghai) Co. Ltd. All Rights Reserved.
* EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co. Ltd in China
* and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co. Ltd.
*/
using UnityEngine;
namespace EasyAR
{
public class ARIsEasyBehaviour : MonoBehaviour
{
private const string title = “Please enter KEY first!“;
private const string boxtitle = “===PLEASE ENTER YOUR KEY HERE===“;
private const string keyMessage = ““
+ “Steps to create the key for this sample:\n“
+ “ 1. login www.easyar.com\n“
+ “ 2. create app with\n“
+ “ Name: HelloAR (Unity)\n“
+ “ Bundle ID: cn.easyar.samples.unity.helloar\n“
+ “ 3. find the created item in the list and show key\n“
+ “ 4. replace all text in TextArea with your key“;
private void Awake()
{
var EasyARBehaviour = FindobjectOfType();
if (EasyARBehaviour.Key.Contains(boxtitle))
{
#if UNITY_EDITOR
UnityEditor.EditorUtility.DisplayDialog(title keyMessage “OK“);
#endif
Debug.LogError(title + “ “ + keyMessage);
}
EasyARBehaviour.Initialize();
foreach (var behaviour in ARBuilder.Instance.AugmenterBehaviours)
{
behaviour.TargetFound += OnTargetFound;
behaviour.TargetLost += OnTargetLost;
behaviour.TextMessage += OnTextMessage;
}
foreach (var behaviour in ARBuilder.Instance.TrackerBehaviours)
{
behaviour.TargetLoad += OnTargetLoad;
behaviour.TargetUnload += OnTargetUnload;
}
}
void OnTargetFound(AugmenterbaseBehaviour augmenterBehaviour ImageTargetbaseBehaviour targetBehaviour Target target)
{
Debug.Log(“ Found: “ + target.Id);
}
void OnTargetLost(AugmenterbaseBehaviour augmenterBehaviour ImageTargetbaseBehaviour targetBehaviour Target target)
{
Debug.Log(“ Lost: “ + target.Id);
}
void OnTargetLoad(ImageTrackerbaseBehaviour trackerBehaviour ImageTargetbaseBehaviour targetBehaviour Target target bool status)
{
Debug.Log(“ Load target (“ + status + “): “ + target.Id + “ (“ + target.Name + “) “ + “ -> “ + trackerBehaviour);
}
void OnTargetUnload(ImageTrackerbaseBehaviour trackerBehaviour ImageTargetbaseBehaviour targetBehaviour Target target bool status)
{
Debug.Log(“ Unload target (“ + status + “): “ + target.Id + “ (“ + target.Name + “) “ + “ -> “ + trackerBehav
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 34436 2017-02-28 23:41 HelloAR\HelloAR.unity
..A..H. 110 2017-02-28 23:40 HelloAR\HelloAR.unity.me
文件 4220 2016-07-28 23:34 HelloAR\Materials\argame.mat
..A..H. 95 2016-07-28 23:34 HelloAR\Materials\argame.mat.me
文件 4220 2016-07-28 23:34 HelloAR\Materials\EasyAR.mat
..A..H. 95 2016-07-28 23:34 HelloAR\Materials\EasyAR.mat.me
文件 4220 2016-07-28 23:34 HelloAR\Materials\idcard.mat
..A..H. 95 2016-07-28 23:34 HelloAR\Materials\idcard.mat.me
文件 4220 2016-07-28 23:34 HelloAR\Materials\namecard.mat
..A..H. 95 2016-07-28 23:34 HelloAR\Materials\namecard.mat.me
..A..H. 107 2016-07-28 23:34 HelloAR\Materials.me
文件 34436 2017-02-28 23:36 HelloAR\Scenes\HelloAR.unity
..A..H. 90 2016-07-28 23:34 HelloAR\Scenes\HelloAR.unity.me
..A..H. 107 2016-07-28 23:34 HelloAR\Scenes.me
文件 3190 2016-07-28 23:34 HelloAR\sc
..A..H. 178 2016-07-28 23:34 HelloAR\sc
文件 2233 2016-07-28 23:34 HelloAR\sc
..A..H. 178 2016-07-28 23:34 HelloAR\sc
..A..H. 107 2016-07-28 23:34 HelloAR\sc
文件 191927 2016-07-28 23:34 HelloAR\Textures\argame00.jpg
..A..H. 981 2016-07-28 23:34 HelloAR\Textures\argame00.jpg.me
文件 17181 2016-07-28 23:34 HelloAR\Textures\EasyAR.jpg
..A..H. 981 2016-07-28 23:34 HelloAR\Textures\EasyAR.jpg.me
文件 10977 2016-07-28 23:34 HelloAR\Textures\idback.jpg
..A..H. 981 2016-07-28 23:34 HelloAR\Textures\idback.jpg.me
文件 185673 2016-07-28 23:34 HelloAR\Textures\namecard.jpg
..A..H. 981 2016-07-28 23:34 HelloAR\Textures\namecard.jpg.me
..A..H. 107 2016-07-28 23:34 HelloAR\Textures.me
目录 0 2017-03-01 14:50 HelloAR\Materials
目录 0 2017-03-01 14:50 HelloAR\Scenes
............此处省略6个文件信息
评论
共有 条评论