C++ Java Unity
Unity Reference
DataSet Class Reference

This class represents a dataset that can be loaded and holds a collection of trackables. Trackables can also be created and destroyed at runtime. More...

Public Types

enum  StorageType {
  STORAGE_APP,
  STORAGE_APPRESOURCE,
  STORAGE_ABSOLUTE
}
 Storage type is used to interpret a given path string. More...
 

Public Member Functions

bool Contains (Trackable trackable)
 Checks if the given trackable is contained in the DataSet More...
 
DataSetTrackableBehaviour CreateTrackable (TrackableSource trackableSource, string gameObjectName)
 Creates a new trackable behaviour attached to a new gameobject with the given name and adds it to this dataset More...
 
DataSetTrackableBehaviour CreateTrackable (TrackableSource trackableSource, GameObject gameObject)
 Adds a single trackable from a source and a given gameobject to this dataset More...
 
bool Destroy (Trackable trackable, bool destroyGameObject)
 This method must not be called while the dataset is active or it will return false. More...
 
void DestroyAllTrackables (bool destroyGameObject)
 Destroys all existing trackables More...
 
IEnumerable< TrackableGetTrackables ()
 Returns the trackables that are defined in the data set. More...
 
bool HasReachedTrackableLimit ()
 Checks if this DataSet's Trackable capacity is reached. Returns true if the number of Trackables created in this DataSet has reached the maximum capacity, false otherwise. More...
 
bool Load (String name)
 Loads a data set from the default "StreamingAssets/Vuforia" directory. More...
 
bool Load (String path, VuforiaUnity.StorageType storageType)
 Loads data set from the given path. Storage type is used to correctly interpret the given path. More...
 

Static Public Member Functions

static bool Exists (String name)
 Checks if a data set exists at the default "StreamingAssets/Vuforia" directory More...
 
static bool Exists (String path, VuforiaUnity.StorageType storageType)
 Checks if a data set exists at the given path. Storage type is used to correctly interpret the given path. More...
 

Properties

VuforiaUnity.StorageType FileStorageType [get]
 Returns the storage type of the data set. More...
 
string Path [get]
 Returns the path to the data set. More...
 

Detailed Description

This class represents a dataset that can be loaded and holds a collection of trackables. Trackables can also be created and destroyed at runtime.

Member Enumeration Documentation

enum StorageType
strong

Storage type is used to interpret a given path string.

Enumerator
STORAGE_APP 

Indicates a relative path to an app local storage location.

STORAGE_APPRESOURCE 

Indicates a relative path to a resource bundled with the application.

STORAGE_ABSOLUTE 

Indicates an absolute path.

Member Function Documentation

bool Contains ( Trackable  trackable)

Checks if the given trackable is contained in the DataSet

DataSetTrackableBehaviour CreateTrackable ( TrackableSource  trackableSource,
string  gameObjectName 
)

Creates a new trackable behaviour attached to a new gameobject with the given name and adds it to this dataset

DataSetTrackableBehaviour CreateTrackable ( TrackableSource  trackableSource,
GameObject  gameObject 
)

Adds a single trackable from a source and a given gameobject to this dataset

bool Destroy ( Trackable  trackable,
bool  destroyGameObject 
)

This method must not be called while the dataset is active or it will return false.

void DestroyAllTrackables ( bool  destroyGameObject)

Destroys all existing trackables

static bool Exists ( String  name)
static

Checks if a data set exists at the default "StreamingAssets/Vuforia" directory

static bool Exists ( String  path,
VuforiaUnity.StorageType  storageType 
)
static

Checks if a data set exists at the given path. Storage type is used to correctly interpret the given path.

IEnumerable<Trackable> GetTrackables ( )

Returns the trackables that are defined in the data set.

bool HasReachedTrackableLimit ( )

Checks if this DataSet's Trackable capacity is reached. Returns true if the number of Trackables created in this DataSet has reached the maximum capacity, false otherwise.

bool Load ( String  name)

Loads a data set from the default "StreamingAssets/Vuforia" directory.

bool Load ( String  path,
VuforiaUnity.StorageType  storageType 
)

Loads data set from the given path. Storage type is used to correctly interpret the given path.

Property Documentation

VuforiaUnity.StorageType FileStorageType
get

Returns the storage type of the data set.

string Path
get

Returns the path to the data set.