Page 1 of 1

Loading Material

Posted: Sun Jul 17, 2022 8:17 am
by robert.nally
Hi,

I'm having an issue where when I load my player's material from Easy Save it loads a Legacy Shader with just a diffuse texture. If I assign the material through a button it comes out alright (shows emission, etc.). Any idea what I might be doing wrong?

playerSkin.material = ES2.Load<Material>("InventoryFile.txt?tag=playerSkinTag");

Is the issue that I'm using Easy Save 2 and not 3? I have Easy Save 3. Would upgrading my existing code be as easy as replacing ES2 with ES3? or might you have any upgrade recommendations?

Thanks,
Rob

Re: Loading Material

Posted: Mon Jul 18, 2022 9:59 am
by Joel
Hi there,

Unfortunately we are unable to provide support for Easy Save 2 as it was depreciated quite a few years ago. Easy Save 3 uses a different format to Easy Save 2, so if you have existing save data you would need to load this using Easy Save 2 and re-save it using Easy Save 3 in order to be able to use it.

If you're able to create a new project with a simple scene using the latest version of Easy Save 3 which replicates this I'm happy to take a look and see what is happening.

All the best,
Joel

Re: Loading Material

Posted: Tue Jul 19, 2022 3:31 am
by robert.nally
Do you have any recommendations for updating or upgrading code from Easy Save 2 to 3? Would it be as simple as swapping ES2 with ES3 in lines like this:

ES2.Save (currentScene, "LevelFile.txt?tag=sceneTag");

Re: Loading Material

Posted: Tue Jul 19, 2022 9:54 am
by Joel
Easy Save 3 has a different API to Easy Save 2, so I recommend taking a look at the guides for Easy Save 3:

https://docs.moodkie.com/product/easy-s ... s3-guides/

For example, we no longer use this notation:
"LevelFile.txt?tag=sceneTag"
And instead your line of code would be:

Code: Select all

ES3.Save("sceneTag", currentScene, "LevelFile.txt");
Detailed information for each method can be found in the API reference:

https://docs.moodkie.com/easy-save-3/es3-api/es3-class/

All the best,
Joel