ES3.CacheFile
Description
Caches a locally-stored file to memory. This enables you to load multiple keys from the file without the overhead of random access or opening the file multiple times.
For more information see the Improving Performance guide.
Parameters
filePath | [Optional] The relative or absolute path of the file we want to cache. |
settings |
[Optional] The settings we want to use to override the default settings. |
Examples
1 2 3 4 5 6 7 8 9 |
// Cache a local file and load from it. ES3.CacheFile("MyFile.es3"); // Create an ES3Settings to load from cache. var settings = new ES3Settings(ES3.Location.Cache); // Load from the cached file. var myInt = ES3.Load("myInt", 0, settings); ES3.LoadInto("myTransform", this.transform, settings); |