SCR_VFS_Enum Class Reference

The VFS_Type JavaScript global object. Enum to define vfs location. More...

Public Types

enum  VFSType { PROJECT = int(VFS_Type::PROJECT), CACHE = int(VFS_Type::CACHE) }
 

Detailed Description

The VFS_Type JavaScript global object. Enum to define vfs location.

// construct a vfs path in the project files of the files.vdb
var pathProject = scene.buildVFSPath("myLocalPath/file.txt", VFS_Type.PROJECT);
// pathProject will look like this:
// {"type":0,
// "vfsId":"4", <- this value is runtime dependent
// "filename":"myLocalPath/file.txt"}
// construct a vfs path in the cache files of the files.vdb
// files in the cache could be erased at any moment. Use this to store data
// that is non-essential to the scene and that can be rebuilt like cached values.
// The cache can also be emptied by calling: scene.clearVFSCache();
var pathCache = scene.buildVFSPath("myLocalPath/file.txt", VFS_Type.CACHE);
// pathCache will look like this:
// {"type":1,
// "vfsId":"4", <- this value is runtime dependent
// "filename":"myLocalPath/file.txt"}

Member Enumeration Documentation

◆ VFSType

Enumerator
PROJECT 
CACHE