public override bool Load(string path, DataSet.StorageType storageType) { if (this.mDataSetPtr == IntPtr.Zero) { Debug.LogError("Called Load without a data set object"); return(false); } string relativePath = path; if ((storageType == DataSet.StorageType.STORAGE_APPRESOURCE) && QCARRuntimeUtilities.IsPlayMode()) { relativePath = "Assets/StreamingAssets/" + relativePath; } if (QCARWrapper.Instance.DataSetLoad(relativePath, (int)storageType, this.mDataSetPtr) == 0) { Debug.LogError("Did not load: " + path); return(false); } this.mPath = path; this.mStorageType = storageType; this.CreateImageTargets(); this.CreateMultiTargets(); this.CreateCylinderTargets(); this.CreateRigidBodyTargets(); ((StateManagerImpl)TrackerManager.Instance.GetStateManager()).AssociateTrackableBehavioursForDataSet(this); return(true); }
public override bool LoadWordListFile(string path, DataSet.StorageType storageType) { if ((storageType == DataSet.StorageType.STORAGE_APPRESOURCE) && QCARRuntimeUtilities.IsPlayMode()) { path = "Assets/StreamingAssets/" + path; } return(QCARWrapper.Instance.WordListLoadWordList(path, (int)storageType) == 1); }
internal static bool ExistsImpl(string path, DataSet.StorageType storageType) { if ((storageType == DataSet.StorageType.STORAGE_APPRESOURCE) && QCARRuntimeUtilities.IsPlayMode()) { path = "Assets/StreamingAssets/" + path; } return(QCARWrapper.Instance.DataSetExists(path, (int)storageType) == 1); }
// Loads data set from the given path. // Storage type is used to correctly interpret the given path. public override bool Load(String path, StorageType storageType) { if (mDataSetPtr == IntPtr.Zero) { Debug.LogError("Called Load without a data set object"); return(false); } // copied on purpose because original value is needed later on String actualPath = path; if (storageType == StorageType.STORAGE_APPRESOURCE && QCARRuntimeUtilities.IsPlayMode()) { actualPath = "Assets/StreamingAssets/" + actualPath; } if (QCARWrapper.Instance.DataSetLoad(actualPath, (int)storageType, mDataSetPtr) == 0) { Debug.LogError("Did not load: " + path); return(false); } // Set path and storage type to associate data sets with Trackables. mPath = path; mStorageType = storageType; // Create Trackabls in this dataset. CreateImageTargets(); CreateMultiTargets(); CreateCylinderTargets(); // associate existing TrackableBehaviours with the trackables in this dataset and create missing behaviours: StateManagerImpl stateManager = (StateManagerImpl)TrackerManager.Instance.GetStateManager(); stateManager.AssociateTrackableBehavioursForDataSet(this); return(true); }
// Loads data set from the given path. // Storage type is used to correctly interpret the given path. public override bool Load(String path, StorageType storageType) { if (mDataSetPtr == IntPtr.Zero) { Debug.LogError("Called Load without a data set object"); return false; } // copied on purpose because original value is needed later on String actualPath = path; if (storageType == StorageType.STORAGE_APPRESOURCE && QCARRuntimeUtilities.IsPlayMode()) { actualPath = "Assets/StreamingAssets/" + actualPath; } if (QCARWrapper.Instance.DataSetLoad(actualPath, (int)storageType, mDataSetPtr) == 0) { Debug.LogError("Did not load: " + path); return false; } // Set path and storage type to associate data sets with Trackables. mPath = path; mStorageType = storageType; // Create Trackabls in this dataset. CreateImageTargets(); CreateMultiTargets(); // associate existing TrackableBehaviours with the trackables in this dataset and create missing behaviours: StateManagerImpl stateManager = (StateManagerImpl)TrackerManager.Instance.GetStateManager(); stateManager.AssociateTrackableBehavioursForDataSet(this); return true; }
public abstract bool LoadWordListFile(string relativePath, DataSet.StorageType storageType);
public abstract bool LoadFilterListFile(string path, DataSet.StorageType storageType);
public abstract int AddWordsFromFile(string path, DataSet.StorageType storageType);