Package com.jme3.asset.plugins
Class FileLocator
java.lang.Object
com.jme3.asset.plugins.FileLocator
- All Implemented Interfaces:
AssetLocator
FileLocator allows you to specify a folder where to
look for assets.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlocate(AssetManager manager, AssetKey key) Request to locate an asset.voidsetRootPath(String rootPath)
-
Constructor Details
-
FileLocator
public FileLocator()
-
-
Method Details
-
setRootPath
- Specified by:
setRootPathin interfaceAssetLocator- Parameters:
rootPath- The root path where to look for assets. Typically, this method will only be called once for each instance of an asset locator.
-
locate
Description copied from interface:AssetLocatorRequest to locate an asset. The asset key contains a name identifying the asset. If an asset was not found, null should be returned. TheAssetInfoimplementation provided should have a proper return value for itsAssetInfo.openStream()method.- Specified by:
locatein interfaceAssetLocator- Parameters:
manager- for managing assetskey- identifies the asset to be located- Returns:
- The
AssetInfothat was located, or null if not found.
-