Wikitude Unity Expert Edition
Public Attributes | Properties | List of all members
Wikitude.TargetCollectionResource Class Reference

Represents a resource that was initialized with a .wtc (Wikitude Target Collection) or .wto (Wikitude Object Collection) file. The file can be loaded either from the device, if it was stored in the StreamingAssets folder, or from a remote server. If the file was loaded from a server, no internet connection is required anymore after loading finished successfully. More...

Inheritance diagram for Wikitude.TargetCollectionResource:
Wikitude.TargetSource

Public Attributes

OnFinishLoadingEvent OnFinishLoading = new OnFinishLoadingEvent()
 Called whenever the resource was successfully loaded from the given URL. More...
 
OnErrorLoadingEvent OnErrorLoading = new OnErrorLoadingEvent()
 Called when the resource could not be loaded.

Parameters
errorThe error describing what went wrong.
More...
 

Properties

string TargetPath [get, set]
 Path or URL to a .wtc or .wto file used for tracking. More...
 
bool UseCustomURL [get, set]
 If false, TargetPath is considered relative to the StreamingAssets folder. More...
 

Detailed Description

Represents a resource that was initialized with a .wtc (Wikitude Target Collection) or .wto (Wikitude Object Collection) file. The file can be loaded either from the device, if it was stored in the StreamingAssets folder, or from a remote server. If the file was loaded from a server, no internet connection is required anymore after loading finished successfully.

When the Target Collection Resource is created at runtime, make sure that all the relevant properties are set before the OnEnable method is called by Unity on the corresponding tracker. At OnEnable, the native representation is created and all information needs to be available.

Member Data Documentation

OnErrorLoadingEvent Wikitude.TargetCollectionResource.OnErrorLoading = new OnErrorLoadingEvent()

Called when the resource could not be loaded.

Parameters
errorThe error describing what went wrong.

OnFinishLoadingEvent Wikitude.TargetCollectionResource.OnFinishLoading = new OnFinishLoadingEvent()

Called whenever the resource was successfully loaded from the given URL.

Property Documentation

string Wikitude.TargetCollectionResource.TargetPath
getset

Path or URL to a .wtc or .wto file used for tracking.

If UseCustomUrl is disabled, the path is considered relative to the StreamingAssets folder, otherwise, it needs to be the absolute path, prefixed with the appropriate protocol (file:// or http(s)://).

bool Wikitude.TargetCollectionResource.UseCustomURL
getset

If false, TargetPath is considered relative to the StreamingAssets folder.

If true, TargetPath is considered absolute and prefixed with the appropriate protocol.