Hi,
I have some big problems, I created a Unity UI Menu because I wanted a scrollbar to scroll the SavesList up and down, and I couldn't find a way to do that with the AC menu's. That integration with Unity UI and AC thankfully works . But what happens next I can't find a solution for:
1. So I created a Main Menu that crossfades to the SaveGames List where you can save a Game. When I save a game, the game takes a snapshot but is still paused (for some reason without enabling pause it won't go back to the game itself like it used to with the AC Menu's). I crossfade back to the Main Menu, close the Main Menu and it should go back to the gameplay, which it does BUT the SavesList Menu is still open. What ever I tried, it keeps displaying, I also don't get any Warning messages from AC, what I ussualy get. So I think this is a bug. Also, if I insert an Action List (ActionList after saving) with an Action that closes the SavesList Menu, the same thing happens: the game goes back to the Normal State and keeps displaying the SavesList Menu. I tried everything by now I think, it won't close, even the Engine : Manage Systems - Menu's disabled won't do anything!
So basically the SavesListMenu stays On after saving and nothing I can do about it.
2. Another problem is the SavesList itself, which looks all good with the slider but doesn't want to save the Empty slots. I created 20 slots. 5 of them already display a screenshot (which are savegames from the preciously created AC Menu that apparently kept their state) and they load fine and save well. But when I want to save a new game in slot 6 (an empty Save Slot), it doesn't do anything! I DID link the right buttons to the AC buttons and applied it to the Canvas but AC won't recognise that this is a save button. However, something I don't know is: should the savegame buttons have the same constant ID as the load buttons? I tried it this way, aswell as having seperate buttons (seperate constant ID's for Load and Save buttons), but both the Load and Save system of the already created games seem to work well. It could be that I missed something here though...
So, to sum it up: How to make an empty Save Button in Unity UI that actually works with AC?
(Using Unity 5.3.1f1 and AC 1.51B)
Comments
1. Upon saving, AC will close any "save" Menu that it finds provided that the Menu's Appear type is either Manual, On Input Key, or On Container. Check that this is the case for your new Save menu.
When you have an issue with a Unity UI-based Menu, always try switching the Menu's Source back to Adventure Creator to see if the problem still exists - this will help us determine where the problem lies. What happens when you try this?
It may be that, while you're turning off the Menu manually in the ActionList, some other operation is turning it back on immediately after. Try locking the Menu instead - it'll prevent the Menu turning on until you unlock it.
2. As with 1), switch back to Adventure Creator as the Menu's Source and see if it then works. Also check that Show 'New save' option? is checked and that 'New save' text has been entered.
The demo game's Menu Manager, Demo_MenuManager, has a Save Menu with a Unity UI counterpart. Load the demo game's Managers and change the Save Menu's Source to Unity Ui Prefab, then run the demo scene. You should find that, so long as there is an empty slot available, you can click on the "New save" slot - bear in mind that you can only save a new game in the next available slot - the other empty slots will be hidden.
If you want to create a dedicated "New save" slot Button, you can do this by creating a regular Button that runs an ActionList which contains the Save: Save or load Action. This Action has an option to perform a Save New Game.
2. I don't know what you mean by "Adventure Source Menus". The Demo_MenuManager's UI counterparts are all found in /AdventureCreator/Demo/UI. Each Menu is already linked to it's associated UI, so changing the Source field should be enough.
A Unity UI Button that is linked to AC's Menu system can be given a Click type of Run Action List in the Menu Manager.