Question before purchasing - saving custom meshes?

Discussion and help for Easy Save 3
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

Again - how to correspond mesh from file and object from AutoSave?

"Correspond" - this is not question about AddComponent()
This is a question about relationships. "Mesh1" to "object1", "Mesh2" to "object2" - how I must doing this relationships table?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Question before purchasing - saving custom meshes?

Post by Joel »

Hi there,

Apologies, I did not understand your previous question.

A way that you could do this would be to save a Dictionary of reference IDs and Meshes. I.e.

Code: Select all

var dict = new Dictionary<long, Mesh>();
dict.Add( ES3ReferenceMgr.Current.Get( yourMeshFilter ), mesh );
// etc
ES3.Save("dict", dict);
And then when loading, you would reassign them using something like this:

Code: Select all

var dict = ES3.Load<Dictionary<long, Mesh>>("dict");
foreach(var kvp in dict)
	((MeshFilter)ES3ReferenceMgr.Get(kvp.Key)).mesh = kvp.Value;
Alternatively if you would like, I can create for you a custom ES3Type for MeshFilter which stores the Mesh by value when saving the MeshFilter, which would work with Auto Save. Please let me know if this would be more suitable in your situation and I will create it for you.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

Great! Thank you! This is what I asked!
I will try this way before, thank you, don't need to create something.

But other small quesion - ES3.Save - it will be other file? Not which creating in AutoSave? Or it will be in one file?
If it will be one file - what must be first - AutoSave or ES3.Save?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Question before purchasing - saving custom meshes?

Post by Joel »

Hi there,

By default they’ll save to different places, but you can change the Auto Save settings to save to the same file name as ES3.Save (the default file name for this is located in Tools > Easy Save 3 > Settings window), and it will still work fine as they’ll save to different keys within that file.

The order in which you save to the file doesn’t matter, as long as you load using Auto Save before loading using ES3.Load.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

Thank you so much!
Will try
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

Great! It working! Meshes saves and loading correct. Thank you!

But now new question - material. I save material like a mesh, and load material. And on object exist material, but it fully without texture, white
Name of material is correct, but Instance material.

Is it possible to correct working with materials and textures?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Question before purchasing - saving custom meshes?

Post by Joel »

Hi there,

Are you saving the Texture separately? As mentioned in my previous post, you will need to do this as saving the Material alone will only store the Texture by reference.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

I dont need saving texture separately, I have only concrete preset of textures inside app. Also all materials inside app, not need some new materials.
Loading material and textures by name is enough
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Question before purchasing - saving custom meshes?

Post by Joel »

Hi there,

Are there references to these Materials/textures in the scene prior to runtime? If not, it would be impossible to load the reference at runtime. In this case you would need to right click your Textures and select Easy Save 3 > Add Reference(s) to Manager while that scene is open.

If this doesn’t resolve your issue, please could you replicate your issue in a new project containing only Easy Save, your Material/Texture, and a simple scene with a script which replicates it, and private message it to me with instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
caduceus
Posts: 15
Joined: Tue Nov 02, 2021 12:23 pm

Re: Question before purchasing - saving custom meshes?

Post by caduceus »

Materials exists in app before start.
I clicked on each material and select Add Reference to Manager. But this is nothing changed. Materials still white after loading.

UPD: I fixed a problem, I loading material from resoureces by name manually. It solved a problem.

Thank you!
Post Reply