I'm new to Adventure Creator, and so far I'm having a lot of fun!
I'd like to control everything with the gamepad. I managed to control a character and the main menu thanks to Rewired/AC support script and AC direct movement / keyboard and controller. I locked and hided the mouse. I'm happy this all works.
Now I did read here I had to switch to Unity UI to use the inventory with a gamepad, so I followed the tutorial to set up an to AC linked inventory created with Unity UI. With a mouse this works as well. I'd like to know how to control it with a gamepad though.
I'd like to build it so that when I push the Y button on my gamepad, the inventory slides on screen, and I'll be able to choose an item with the control stick and A button. It's ok if the character freezes, but background animations should continue. Then with the Y button the inventory slides off screen again.
I hope to find some tips here that'll get me in the right direction. Basically what I'd like to know can AC do something more for me here or should I really just dive in and create my own scripts for these things?
Comments
To clarify: "AC" menus are still able to handle direct-navigation, but Unity UI has more flexibility in general. Each of the default Menus provided by the New Game Wizard also have a Unity UI counterpart, which can be activated by changing your default Menu's Source field to Unity Ui Prefab.
In order to directly-navigate a Unity UI-based Menu, however, you must specify which element is first selected when the Menu turns on. This can be done from the bottom of the Menu's list of properties in the Menu Manager - or by using the Menu: Select element Action.
Additionally, unless your Menu pauses the game when turned on, you will also have to allow for direct-navigation of it using the Engine: Manage systems Action, which has its own Direct-control in-game Menus option. For more on this topic, see the Manual's "Navigating menus directly" chapter.
As for having your gamepad toggle the Inventory menu, you have two options:
- Set the Menu's Appear type to On Input Key, and (using Unity's Input Manager) map your gamepad button to the input defined in the Menu.
- Define Active Inputs that respond to the gamepad button and use the Menu: Check state / Menu: Change state Actions to toggle the menu on/off accordingly.
Both of these techniques are covered in the 3D Tutorial here and here respectively.Because I've been a little short on time these days I haven't found the time yet how figure out how to at this Engine: Manage systems Action. See I'm quite green xD
But I will get there, and when I'll have it all working I'll certainly come back to this post. I just couldn't wait to say.. Thanks!