[size=1em] 1 [size=1em] 2 [size=1em] 3 [size=1em] 4 [size=1em] 5 [size=1em] 6 [size=1em] 7 [size=1em] 8 [size=1em] 9 [size=1em] 10 [size=1em] 11 [size=1em] 12 [size=1em] 13 [size=1em] 14 [size=1em] 15 [size=1em] 16 [size=1em] 17 [size=1em] 18 [size=1em] 19 [size=1em] 20 [size=1em] 21 [size=1em] 22 [size=1em] 23 [size=1em] 24 [size=1em] 25 [size=1em] 26 [size=1em] 27 [size=1em] 28 [size=1em] 29 [size=1em] 30 [size=1em] 31 [size=1em] 32 [size=1em] 33 [size=1em] 34 [size=1em] 35 [size=1em] 36 [size=1em] 37 [size=1em] 38 [size=1em] 39 [size=1em] 40 [size=1em] 41 [size=1em] 42 [size=1em] 43 [size=1em] 44 [size=1em] 45 [size=1em] 46 [size=1em] 47 [size=1em] 48 [size=1em] 49 [size=1em] 50 [size=1em] 51 [size=1em] 52 [size=1em] 53 [size=1em] 54 [size=1em] 55 [size=1em] 56 [size=1em] 57 [size=1em] 58 [size=1em] 59 [size=1em] 60 [size=1em] 61 [size=1em] 62 [size=1em] 63 [size=1em] 64 [size=1em] 65 [size=1em] 66 [size=1em] 67 | [size=1em] [size=1em] using UnityEngine; [size=1em] [size=1em] using Vuforia; [size=1em] [size=1em] using System.Collections; [size=1em] [size=1em] using System.Collections.Generic; [size=1em] [size=1em] [size=1em] [size=1em] public class SDCardDataSetLoader : MonoBehaviour [size=1em] [size=1em] { [size=1em] [size=1em] private bool mLoaded = false; [size=1em] [size=1em] private DataSet mDataset = null; [size=1em] [size=1em] // Update is called once per frame [size=1em] [size=1em] void Update() [size=1em] [size=1em] { [size=1em] [size=1em] if (VuforiaRuntimeUtilities.IsVuforiaEnabled() && !mLoaded) [size=1em] [size=1em] { [size=1em] [size=1em] string externalPath = "/mnt/sdcard/tARMac.xml"; [size=1em] [size=1em] [size=1em] [size=1em] if (mDataset == null) [size=1em] [size=1em] { [size=1em] [size=1em] // First, create the dataset [size=1em] [size=1em] ObjectTracker tracker = TrackerManager.Instance.GetTracker [size=1em] [size=1em] mDataset = tracker.CreateDataSet(); [size=1em] [size=1em] } [size=1em] [size=1em] [size=1em] [size=1em] if (mDataset.Load(externalPath, VuforiaUnity.StorageType.STORAGE_ABSOLUTE)) [size=1em] [size=1em] { [size=1em] [size=1em] mLoaded = true; [size=1em] [size=1em] } [size=1em] [size=1em] else [size=1em] [size=1em] { [size=1em] [size=1em] Debug.LogError("Failed to load dataset!"); [size=1em] [size=1em] } [size=1em] [size=1em] } [size=1em] [size=1em] } [size=1em] [size=1em] } |
更多回帖