I suppose there's a typo in the documentation (improving performance)

Discussion and help for Easy Save 3
Post Reply
lomantic
Posts: 1
Joined: Mon Sep 12, 2022 9:07 am

I suppose there's a typo in the documentation (improving performance)

Post by lomantic »

Since I'm new to EasySave3, I've been following the documentation and got stuck with the code below

https://docs.moodkie.com/easy-save-3/es ... rformance/

Code: Select all

// 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);
I suppose <ES3.Location.Cache> should be "MyFile.es3"
I'm not very sure but I've tested the code and it seems to work properly
Attachments
4.png
4.png (22.8 KiB) Viewed 543 times
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: I suppose there's a typo in the documentation (improving performance)

Post by Joel »

Hi there,

Thanks for the information. There is an error but to resolve it you need to add the filename and ES3.Location.Cache when creating the ES3Settings. I.e.

Code: Select all

// Cache a local file and load from it.
ES3.CacheFile("MyFile.es3");
 
// Create an ES3Settings to load from cache.
var settings = new ES3Settings("MyFile.es3", ES3.Location.Cache);
 
// Load from the cached file.
var myInt = ES3.Load("myInt", 0, settings);
ES3.LoadInto("myTransform", this.transform, settings);
Alternatively we could simply omit the filename from the ES3.CacheFile call and it will load from the default file. I.e. However, we'll update the example in the docs to the former example as we feel it is clearer.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply