interface IFeaturePreloader (Niantic.ARDK.Utilities.Preloading.IFeaturePreloader)
Overview
Interface for ARDK class that pre-downloads all necessary assets for certain ARDK features to function. If the files are not preloaded, they will take time to download when an ARSession configured to use those features is run. More...
interface IFeaturePreloader: IDisposable { // methods void ClearCache(Feature feature); void Download(Feature[] features); bool ExistsInCache(Feature feature); float GetProgress(Feature feature); PreloadedFeatureState GetStatus(Feature feature); };
Detailed Documentation
Interface for ARDK class that pre-downloads all necessary assets for certain ARDK features to function. If the files are not preloaded, they will take time to download when an ARSession configured to use those features is run.
Methods
void ClearCache(Feature feature)
Clears this feature from the application's cache. Calling this while a download is in process, or while downloaded features are being used in an ARSession, is invalid and will result in undefined behaviour.
void Download(Feature[] features)
Begin the download of all added features. Calling this after an ARSession has already run is undefined behaviour.
bool ExistsInCache(Feature feature)
Parameters:
feature |
Returns:
True if the specified feature was found in the application's cache. When running in Virtual Studio's Mock mode, features will disappear from the cache when the preloader is disposed.
float GetProgress(Feature feature)
Parameters:
feature |
Returns:
A value in the range of [0.0, 1.0] representing how much progress has been made downloading the specified feature.
PreloadedFeatureState GetStatus(Feature feature)
Parameters:
feature |
Returns:
The current preload state of the specified feature. On device, if this feature was cleared from the cache after it was completely downloaded, it will still return the last known status.