Inherited By: ImageTarget
Target is the base class for all targets that can be tracked by ImageTracker or other algorithms inside EasyAR.
A target should be loaded before any value is valid.
Creates a Target object.
The target id. A target id is a int number generated at runtime, it is valid (non-zero) only after a successful load.
The target uid. A target uid is useful in cloud based algorithms. If no cloud is used, you can set this uid in the json config as a alternative method to distinguish from targets.
The target name. Name is used to distinguish targets in a json file. see Load for more details.
The meta data. In a cloud returned target, the meta data is pre-set in the cloud server.
A set operation will set the data as string. It will erase previously set data or data from cloud.
Returns a list of images that stored in the target. It is generally used to get image data from cloud returned target.
static List<Target> LoadListFromJsonFile(string path, StorageType storageType) (until 1.2.1)¶
Loads all targets listed in the json file from path with storageType . See Load and StorageType for more descriptions of storageType and json file.
static List<Target> LoadListFromJsonString(string json, StorageType storageType) (until 1.2.1)¶
Loads all targets listed in the json string json with storageType . See Load and StorageType for more descriptions of storageType and json file.
virtual bool Load(string path, int storageType, string name)¶
Load a json file or json string. The implement of this method is empty, you should use it from a derived class.
Load named target if name is not empty, otherwise load the first target.
If path is json file path, storageType should be StorageType.App or StorageType.Assets or StorageType.Absolute indicating the path type. Paths inside json files should be absolute path or relative path to the json file.
If path is json string, storageType should be (StorageType.App | StorageType.Json) or (StorageType.Assets | StorageType.Json) or ( StorageType.Absolute | StorageType.Json). Paths inside json string should be absolute path or relative path to the storageType root.
See StorageType for more descriptions of StorageType.