Page 3 of 3
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 10:39 am
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 10:47 am
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 10:50 am
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 4:53 pm
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 6:16 pm
by vectorfrog
Thank you for this. I will take a look and see what I can get working for my project.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 8:06 pm
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 9:00 pm
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?
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 9:20 pm
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.
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 9:46 pm
by vectorfrog
I followed the code in that link and it works perfectly. Thanks again Tony!
Re: UIS and UCC with Quest Machine
Posted: Wed May 11, 2022 9:50 pm
by Tony Li
Happy to help!