UIS and UCC with Quest Machine

Announcements, support questions, and discussion for Save System for Opsive Character Controllers.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Hello,

I don't want to change the look and feel of the UI as it is. I'd like to keep the Item Action buttons there for saving and loading. So when you click on a save game slot, it opens the context popup menu with the available options to perform. Save, Load, Delete, Cancel.

I just want to hook up to the onClick of the Save/Load/Delete correct? I found in the Opsive code where this menu is being generated but getting stuck on how to implement the Pixel Crushers Save System methods to these buttons.
User avatar
Tony Li
Posts: 22200
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

You can emulate the look and feel, but you can't use the SaveView and SaveViewModule scripts because those are specific to UIS's built-in save system. I can put together an example later this week if you're interested.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Yes, an example would be very helpful, thank you. I will keep at it and see if I can get something to work.
User avatar
Tony Li
Posts: 22200
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Here's an example:

UIS_SS_SaveButtonExample_2022-05-11.unitypackage

It's based on the UIS demo scene since the configuration of the UIS menu doesn't have anything to do with UCC.

Inventory System Canvas > Demo Full Layout > Main Menu's Element 1 points to a new Custom Save Menu child GameObject.

Custom Save Menu uses a short custom script to interface with the Pixel Crushers save system.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Thank you for this. I will take a look and see what I can get working for my project.
User avatar
Tony Li
Posts: 22200
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

You should be able to take the "Custom Save Menu" GameObject from the example scene, drop it into your Inventory Manager Canvas, and point Element 2 to it, and that'll do it.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

I did that, and it works perfectly! Thank you very much. I would like to be able to include a timestamp for the save slot button. What information is available in the save data for this?
User avatar
Tony Li
Posts: 22200
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Darn, I was going to add that, and I completely forgot! Please see: How To: Include Summary Info in Saved Games.

The CustomSaveMenu script sets the contentText of each slot. Using the code in the link above, you can add summary info such as the timestamp, scene that the player saved in, player's level, etc., to contentText.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

I followed the code in that link and it works perfectly. Thanks again Tony!
User avatar
Tony Li
Posts: 22200
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Happy to help!
Post Reply