Search found 13 matches

by seaniboy2009
Tue Oct 05, 2021 1:41 pm
Forum: General Discussion
Topic: ArgumentException: An item with the same key has already been added
Replies: 2
Views: 1087

Re: ArgumentException: An item with the same key has already been added

I have resolved it, what i think has happened there was a reference to the prefab i change still in the scene, but the prefab itself did not update, so when saving i was getting the error.

I deleted it then replaced it with the updated prefab and the save now works.
by seaniboy2009
Tue Oct 05, 2021 1:17 pm
Forum: General Discussion
Topic: ArgumentException: An item with the same key has already been added
Replies: 2
Views: 1087

ArgumentException: An item with the same key has already been added

Hi, I am getting this exception when trying to save, not really sure why as everything has been working fine until I changed 1 prefab. Code: public void SaveGameData(int slot) { if (slot == 1) { ES3AutoSaveMgr.Instance.settings.path = "SaveFile1/AutoSave1.es3"; ES3Settings.defaultSettings....
by seaniboy2009
Fri Aug 27, 2021 2:48 pm
Forum: General Discussion
Topic: autsave manger, changing the file path
Replies: 4
Views: 921

Re: autsave manger, changing the file path

I also noticed its not loading the prefabs that i place in the game once i load the level again.

i set the autosave folder on awake, then i call ES3AutoSaveMgr.Instance.Load();, but non of the prefabs are spawned.
by seaniboy2009
Fri Aug 27, 2021 2:09 pm
Forum: General Discussion
Topic: autsave manger, changing the file path
Replies: 4
Views: 921

Re: autsave manger, changing the file path

Thanks again joel, it is working now, just one more question is the below the best way to see if a file and save exists, or is there a function i can use?

if (ES3Settings.defaultSettings.path == "SaveFile1/SaveSlot1")
{
do something
}

else
{
save does not exist
}
by seaniboy2009
Fri Aug 27, 2021 12:39 pm
Forum: General Discussion
Topic: autsave manger, changing the file path
Replies: 4
Views: 921

autsave manger, changing the file path

Hi, I have been implementing save slots for my game, I change the path for the save manager and the autosave path using below: public void SetSaveSlotAndLoad(int slot) { if (slot == 1) { ES3AutoSaveMgr.Instance.settings.path = "SaveFile1/AutoSave1.es3"; ES3Settings.defaultSettings.path = &...
by seaniboy2009
Sat Jul 31, 2021 12:39 pm
Forum: General Discussion
Topic: Save guid for prefabs that need to be diffrent
Replies: 9
Views: 1870

Re: Save guid for prefabs that need to be diffrent

Ok i have found the issue and resolved.

If the mesh filter mesh name has the same name as anything else in the scene it cant load it, the mesh was called plane and there was another mesh with that name, i imported to blender renamed the mesh and imported again and the issue is resolved.
by seaniboy2009
Sat Jul 31, 2021 12:12 pm
Forum: General Discussion
Topic: Save guid for prefabs that need to be diffrent
Replies: 9
Views: 1870

Re: Save guid for prefabs that need to be diffrent

Hi Joel, I got it working with using the autosave and removing the save and load code, it saves all the items and loads them per game object, however for some reason some of the game objects appear invisible, its still there and the colliders and such are all there but you cant see it, i investigate...
by seaniboy2009
Wed Jul 28, 2021 3:35 pm
Forum: General Discussion
Topic: Save guid for prefabs that need to be diffrent
Replies: 9
Views: 1870

Re: Save guid for prefabs that need to be diffrent

Sorry i don't think i am explaining this correctly. I have 2 objects in the scene with the same script attached, both save on application quit, both use this ES3.Save("FurnaceList", currentItems);(this is a list of scriptable objects) so for example i have: furnace A furnace B i then add O...
by seaniboy2009
Wed Jul 28, 2021 11:46 am
Forum: General Discussion
Topic: Save guid for prefabs that need to be diffrent
Replies: 9
Views: 1870

Re: Save guid for prefabs that need to be diffrent

Hi Joel, Yes, well i think i am going by the link you sent me, my code below, but the issue is if there are more than 1 prefab they all get the same list added to them because it loads the same list. public void SaveFurnace() { ES3.Save("FurnaceList", currentItems); } so for each of the fu...
by seaniboy2009
Wed Jul 28, 2021 9:35 am
Forum: General Discussion
Topic: Save guid for prefabs that need to be diffrent
Replies: 9
Views: 1870

Re: Save guid for prefabs that need to be diffrent

Hi Joel, Yes sorry, i have two stash game objects both are a prefab, the player can place items into this, and the game can then save the list of items, but how do i save them separately, so when it is loaded the two stashes dont have the same items in there, if i use a guid, its the same for both s...