I searched the forum for a similar topic but couldn’t find a clear solution, only some ideas that didn’t help much. It’s about saving the session for the long-term memory of a Metahuman. I couldn’t find anywhere the option for session ID -1 or what exactly needs to be changed to be able to resume the same conversation with the avatar if I close and reopen the Unreal application.
Thank you, and I appreciate any response that can help me.
How to Save and Load Session ID using SaveGame System – ConvaiBaseCharacter Blueprint
You can save and load the Session ID in Unreal Engine using the SaveGame system. Below is a detailed guide to implement this feature, including creating the BP_ConvaiSave SaveGame object. This solution has been entirely created within the ConvaiBaseCharacter Blueprint.
Step 1: Create the SaveGame Object (BP_ConvaiSave)
Open the Content Browser:
In Unreal Engine, go to your Content Browser where you manage your project files.
Create a New SaveGame Blueprint Class:
Right-click in the Content Browser and select: Blueprint Class → Search for SaveGame → Select SaveGame.
Name the new Blueprint something like BP_ConvaiSave.
Add a SessionID Variable:
Open the BP_ConvaiSave Blueprint.
In the Variables panel, add a new variable:
Name:SessionID
Type:String
Compile and save the Blueprint.
The BP_ConvaiSave object is now ready to store the Session ID.
Step 2: Saving the Session ID
In the On Finished Talking event of the ConvaiBaseCharacter Blueprint, implement the following steps:
Create Save Game Object:
Use the Create Save Game Object node and select BP_ConvaiSave as the class.
Set Session ID:
Assign the Session ID from the Convai Chatbot to the SessionID variable of the SaveGame object.
Save Game to Slot:
Use the Save Game to Slot node to save the SaveGame object. Set the slot name to "Session".
Add a Branch to check if the save operation was successful and print the result using a Print String node.
This implementation uses Unreal Engine’s SaveGame system to save and load Session ID data.
The primary goal is to Get the Session ID and Set it back later.
There are multiple ways to handle saving and loading depending on your requirements.
This guide focuses on the basic implementation within Unreal Engine’s Blueprint system. Any further extensions or customizations depend on your project’s needs. For additional help, you can explore Unreal Engine’s documentation and community tutorials.
Feel free to ask if you have any questions or need clarification!
Hey. Thanks again for solution. I did everything like in description, yet for each session my avatar still starts from scratch. Maybe I missed something, I will try again later…
Successfully Saved ! . As in blueprints. Yet no session load I believe. I will still try later, step by step. Somebody maybe has a simple template project that works ? I will just change charID.
Could you please consolidate your Load Blueprint into one complete view and share it without cropping any parts? Additionally, add a new pin to the Sequence node and use it, do not break the connection for Then 3.
Thank you for sharing the logs via private message.
Upon reviewing them, I couldn’t find any logs related to the Load execution. It seems the load process might not be executing as expected. Could you please confirm if you included the specific logs I mentioned earlier?