The Ultimate Save System

Your inventory save system is absolutely the best for saving inventory and character components. Unfortunately, it does not incorporate saving the active state and transform state of other objects in the game. Easy Save does a tremendous job of that, allowing one to save just the active state clear to saving every component in each individual item in the game.
Your save system allows using an optional SAVE, LOAD, and DELETE event. Doing so ignores your save system, which is unacceptable lol.
It would be a WIN/WIN for your awesome Opsive Developer to integrate Easy Save. That would allow you to offer a complete save system which many would love to have. It also would be a win for Easy Save being partnered with you.
Please consider looking into this,
Thank you.
Trent
 
In the meantime, check out this page on how to use our save system inside a third party save system:
 
  • Like
Reactions: _aL
Opsive Save System Help 01.png
I have spent hours trying to have your files share information with Easy Saves files. Then I learned that your files do not like sharing information with hardly any other files. For your suggested fix for my 2 save system to work, I need the files to be able to access one another. Is there something I am missing? Is there a hint that you can give me to make this happen?

I do appreciate any help I get.
Thank you,
Trent
 
You must refenrece the UIS Assembly definition to access UIS code outside of its assembly and vice versa.

Unity strongly suggest Asset store packages to use Assembly definitions:

If you are not familiar with that concept check out some of the youtube videos on this subject:


It seems that Easy Save doesn't have an assembly definition by default, but has an option to add one. Check out their documentation here:

You can choose to reference the Esay save assembly in UIS or vice versa. OR you can make a new assembly definition and reference both UIS and Easy Save definitions (That's what I would recommend). Then you'll have access to both assemblies in your code.

I hope that helps
 
I finally have the 2 save systems working, somewhat. As I CLICK on Save, Load or Delete, the EasySave action is completed. Then when I hit Confirm, the Opsive Save Action is completed. Same with Load and Delete. I have been through your SettableActionPanel thoroughly, and with my limited experience, can not figure how to make the Save, Load, and Delete work with the Confirmation popup.

Again, BOTH systems are now working. The Easy Save is set to the itemActionButton OnClick event. And the Opsive save works with the confirmation Popup.

Can I make both save systems work with the popup confirmation?



Easy Save Settings 04.pngEasy Save Settings 05.pngEasy Save Settings 07.png
 
The save action is set on the SaveGrid component. You should add yours in there in the optional save/load/delete events. It should automatically work with the confirmation popup.
1697016618552.png
I hope that helps
 
Thank you. I have tried this; however, doing so makes your save system not work. I finally achieved success today using both Opsive Save and Easy Save. I'll show how this was achieved in pictures. Your help was the key in putting this together. Thank you.

1. Make sure, as you showed, that Easy Save is made to an Assembly Definition, explained in the video you shared.
2. Add EasySave3 to Opsive.Shared
3. Add public ES3 to Opsive SaveSystemManager
4. After SAVEETODISKINTERNAL, line 489 (roughly) , add ES3AutoSaveMgr.Current.Save();
 

Attachments

  • Success 05.png
    Success 05.png
    20 KB · Views: 7
  • Success 034png.png
    Success 034png.png
    8.7 KB · Views: 11
  • Success 03.png
    Success 03.png
    24.3 KB · Views: 9
  • Success 02.png
    Success 02.png
    11.9 KB · Views: 10
  • Success 01.png
    Success 01.png
    12.3 KB · Views: 8
5. After LAODALLSAVERS(); (roughly line 587), add ES3AutoSaveMgr.Current.Load();
6. After DeleteFromDiskInternal(SaveIndex): (roughly line 622) , add ES3.DeleteFile();

This makes Opsives Inventory Save System work with EasySave system, so one can save both the inventory of opsive and the states of all game objects.

I do not know if this is exactly the best way, but it seems to work with no errors.
It does only allow the use of 1 save file, not 3.

Hope this might help someone.
 

Attachments

  • Success 06.png
    Success 06.png
    25.2 KB · Views: 6
  • Success 07.png
    Success 07.png
    12.7 KB · Views: 6
@talkingheads When you say it stops the save from working, do you mean nothing is saved at all?
Could you give me more information on your use case?

The "correct" way to integrate the save system with other systems is describred here:

The Optional Save events in the inspector are more for triggering UI/SFX effects than for actually hooking up save logic
 
@talkingheads When you say it stops the save from working, do you mean nothing is saved at all?
Could you give me more information on your use case?

The "correct" way to integrate the save system with other systems is describred here:

The Optional Save events in the inspector are more for triggering UI/SFX effects than for actually hooking up save logic
exactly this, in the sense that I tried using the optional save events to trigger a pop up and it stopped the save from working, haven't looked into the code but if the optional event is booled on it stops the save from working.
 
Looking at the code it seems that's the way I coded it. I must have forgotten.
I think the idea was that you could hook in your own code to handle before and after saving. The "Optional" part of the name was meant to indicate that the saving would be optional since you would choose to save or not via your own code.

As for your own use case of having some visual/audio feedback, You can use the Optional Unity event in the inspector to Call the Save, Load, Delete function.
I will add some text in the inspector and some additional functions to make this easier to understand and hook up.

Do you think this text makes sense?:

Code:
[Header("Enabling Optional events cancels the default function. If enabled you must add a call to the relevant Save, Load, Delete function available on this component.")]

and these would be the functions I'll be adding:

        /// <summary>
        /// Save the game data in the save index.
        /// </summary>
        /// <param name="index">The index where to save the game data.</param>
        public virtual void Save(int index)
        {
            SaveSystemManager.Save(index);
        }
        
        /// <summary>
        /// Load the save data fom the index.
        /// </summary>
        /// <param name="index">The index from which to load the data.</param>
        public virtual void Load(int index)
        {
            SaveSystemManager.Load(index);
        }
        
        /// <summary>
        /// Delete the save file at the index.
        /// </summary>
        /// <param name="index">The index of the save file to delete.</param>
        public virtual void Delete(int index)
        {
            SaveSystemManager.DeleteSave(index);
        }
 
I spent weeks getting your save system to work in conjunction with Easy Save. Recently for optimization purposes, I had to upgrade from using Unity 2021.3.2 to 2022.3.17f1. In so doing, the assembly definition easy save no longer works with the opsive upgrade needed to work on unity 2022. The whole project upgraded to the new unity editor and works perfectly, other than the save system manager which no longer accepts easy save in assembly reference, or for some reason it is not reading the ES3 without errors as shown in the pictures. You have been tremendous help in my project, but this is a major setback. Can you please look into this? Easy save says it is a bug in Unity. Unity says it is in the way I upgraded the package.
Easy save works in the new editor via save by application quit and load on awake. It is not with Easy save. The whole project other than a combined save system of Opsive and Easy Save, works with the new editor, I do not believe it is with Unity. I am leaning towards something in your upgrade made the assembly reference not work. Opsive Save and Easy Save work together in version 2021 but not 2022.

Thank you for any help in solving this issue.


Opsive 01.pngOpsive 02.pngOpsive 03.png
 
Try removing the Assembly definition and adding it back.

If that does not work. I recommend you try another approach.

Rather than editing the UIS source code.
Make a custom script that listens to the OnSave OnLoad events.
If that's not an option, try inheriting the SaveSystemManager.

The idea here is that you can have your own scripts with an Assembly definition. And they can reference both UIS and Easy Save 3 assembly definitions.
This is the recommeneded way of doing it. As changing the source code of Asset Store assets can be an issue if you plan on updating down the line (all your changes are overwritten)

I hope that guides you in the right direction.

(Also read the other messages in this thread as you might find another solution to your problem)
 
So I started trying to implement my own save system as you suggest. I created my own Assembly Definition and referenced Easy Save and Opsive Shared. The script easily referenced Easy Save, but not Opsive. So I added all the available Opsive Assembly Definition References possible, and still the code does not reference Opsive. I am sure this should be easy as you and others indicate; however, easily referencing your scripts seems to be rather difficult. Could you possibly spend a few minutes testing this and share your results?
 

Attachments

  • Opsive 04.png
    Opsive 04.png
    39.8 KB · Views: 6
  • Opsive 05.png
    Opsive 05.png
    78.2 KB · Views: 5
Top