Saving procedurally instantiated prefabs

Discussion and help for Easy Save 3
Post Reply
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Saving procedurally instantiated prefabs

Post by nFighter »

Hey! I believe it should be a common task, but I’m not fully understand the concept so I’m not sure what exactly I need to search.

I have a scene with procedurally instantiated Prefabs. I’m using MapMagic to populate scene with objects. With the same “seed” same prefabs always instantiated in the same place. Is there a way I could save/load this instantiated prefabs state with EasySave?

Let’s say I instantiate red cubes on scene start, during the gameplay some of them were colored green. Can I save this state, so on next scene load my instantiated cubes will be colored accordingly?
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Re: Saving procedurally instantiated prefabs

Post by nFighter »

I suppose it could be some logic on prefab that save the components state and load it when the prefab instantiated...
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving procedurally instantiated prefabs

Post by Joel »

Hi there,

There's information on saving and loading prefabs in general here:
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/

As I have no experience with MapMagic I'm afraid I can't comment on that directly.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Re: Saving procedurally instantiated prefabs

Post by nFighter »

As far as I understand - ES3 want to instance saved prefab, but I want to handle the instancing myself. And only ask ES3 to restore component state on my instanced prefab, does this kind of workflow exist?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving procedurally instantiated prefabs

Post by Joel »

Hi there,

In this circumstance you would use ES3.LoadInto to load the data into your prefab instance, or save the Components individually and load these into the Components on your prefab instance.

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