Hey,
I tested it on my own scene, but always ran into an error, even though i followed different guides like this one:
https://docs.moodkie.com/easy-save-3/es ... s-prefabs/
I thought I did something wrong, so I tried for hours by now.
Then I found your example Scene:
https://moodkie.com/forum/viewtopic.php?f=18&t=1468
I thought yey, I will copy and modify that. But the same Error occures (see attachment)
What is the problem?
To specify what I want (should be very casual):
I have a game Object that stores furniture, all of the furniture are prefabs. They are added ingame as instances.
The next time I open the scene, the Prefabs Instances should be in the same position as before.
It worked with the normal object safe, but then it looses all the scripts, rigidbody etc. of the prefab. Ass suggested in the guide, I added a "ES3 Prefab" to the object, but as soon as I do that, the error starts to occure. As I said, it seams to be the same as in your example Scene.
Hope you can help me.
Kind Regards,
Mark
Saving Prefabs doesn't work
Saving Prefabs doesn't work
- Attachments
-
- PrefabProblem.JPG (48.33 KiB) Viewed 2018 times
Re: Saving Prefabs doesn't work
Hi Mark,
Please could you show me the code you're using to save and load? It's not possible to tell what is happening from what you've sent me, but it looks like you're trying to use an ES3SerializableDictionary, which is internal and should not be used.
All the best,
Joel
Please could you show me the code you're using to save and load? It's not possible to tell what is happening from what you've sent me, but it looks like you're trying to use an ES3SerializableDictionary, which is internal and should not be used.
All the best,
Joel
Re: Saving Prefabs doesn't work
I get the error code already just by using your basic example Scene, nothing modified.
- Attachments
-
- SceneUsed.JPG (143.25 KiB) Viewed 2015 times
Re: Saving Prefabs doesn't work
For my own Scene, the code looks like this.
As you can see, I already tried to build a Workaround by saving and loading each element individually, because the autosave was not working. This code works, but it spawns only the Objects, not the prefabs, so every script + rigidbody etc. on them is missing.
As soon as I add ES3 Prefab component to the prefabs, the errorcode appears while trying to save.
As you can see, I already tried to build a Workaround by saving and loading each element individually, because the autosave was not working. This code works, but it spawns only the Objects, not the prefabs, so every script + rigidbody etc. on them is missing.
As soon as I add ES3 Prefab component to the prefabs, the errorcode appears while trying to save.
- Attachments
-
- MyCode.JPG (92.26 KiB) Viewed 2015 times
Re: Saving Prefabs doesn't work
Hi there,
Have you modified any of the Easy Save scripts at all? I'm not getting this issue at my end and I'm not sure how this could occur.
All the best,
Joel
Have you modified any of the Easy Save scripts at all? I'm not getting this issue at my end and I'm not sure how this could occur.
All the best,
Joel
Re: Saving Prefabs doesn't work
No, at least not as I was aware of.
Probably best if I reinstall the plugin.
Haven't been working with Unity for too long, is there a best way to do so without "destroying" anything?
Probably best if I reinstall the plugin.
Haven't been working with Unity for too long, is there a best way to do so without "destroying" anything?
Re: Saving Prefabs doesn't work
Hi there,
You can reinstall Easy Save by deleting the Assets/Plugins/Easy Save 3/ and Assets/Easy Save 3/ folder (if it exists), and reimporting from the Asset Store.
All the best,
Joel
You can reinstall Easy Save by deleting the Assets/Plugins/Easy Save 3/ and Assets/Easy Save 3/ folder (if it exists), and reimporting from the Asset Store.
All the best,
Joel
Re: Saving Prefabs doesn't work
Just to keep you up to date:
reinstalling the Plugin seams to have fixed it, first tests worked!
Just the Scriptable Object (Item) in a Script on the Prefab wasn't saved as the Instantiated Item that it acctually was and spawned as the original. But I just switched this with a clone of the original Item on spawn.
So it is currently working now *-*
Could you still please explain the reason, why the scriptable Object on the ES3 Prefab was not saved as instantiated, but as the original?
Thanks for your help! Especially considering it was sunday!
reinstalling the Plugin seams to have fixed it, first tests worked!
Just the Scriptable Object (Item) in a Script on the Prefab wasn't saved as the Instantiated Item that it acctually was and spawned as the original. But I just switched this with a clone of the original Item on spawn.
So it is currently working now *-*
Could you still please explain the reason, why the scriptable Object on the ES3 Prefab was not saved as instantiated, but as the original?
Thanks for your help! Especially considering it was sunday!
Re: Saving Prefabs doesn't work
Hi there,
Glad you've managed to make progress
Just to clarify, as the ScriptableObject is a field on a Component of the prefab, it will be saved by reference. If you want to save it by value, you should save it separately.
All the best,
Joel
Glad you've managed to make progress
Just to clarify, as the ScriptableObject is a field on a Component of the prefab, it will be saved by reference. If you want to save it by value, you should save it separately.
All the best,
Joel