我目前用的是高通6117版本的SDK,最新版函数改动不多,大体上一致,话不多说上代码
using UnityEngine;
using System.Collections;
using Vuforia;
using System.Collections.Generic;
using System.IO;
using UnityEngine.UI;
public class Vuforia_Template : MonoBehaviour
{
private string sz_DataPath = null;
private bool b_LoadDataSet = false;
private ObjectTracker m_ObjectTracker = null;
private DataSet m_DataSet = null;
private ImageTargetBehaviour[] m_ImageTargetBehaviours = null;
private static Vuforia_Template _insttance = null;
/// <summary>
/// 是否为使用本地识别库数据
/// </summary>
[Header("是否为使用本地识别库数据")]
public bool b_Location = false;
public static Vuforia_Template Instance
{
get { return _insttance; }
}
public string GetDataPath
{
get { return sz_DataPath; }
set { sz_DataPath = value; }
}
private void Awake()
{
_insttance = this;
}
void Start()
{
//string path = Application.isEditor ? Application.persistentDataPath.Replace("/" + Application.productName, "") : Application.persistentDataPath;
//GetDataPath = path + "/" + "Capable" + ".xml";
Vufor