Hello, I am trying to setup an Inventory that is shown if the user presses an Inventory button (always visible on the screen).
I am building a game for mobiles, so I am using Touch Screen as Input method.
The scene starts with the Inventory button locked, since I need the user to learn how to play the game and enabling things one at a time.
I am enabling the Inventory button after the user picks up a backpack that's in the scene.
I am using "Unlock Menu" to show the Inventory Button.
It is just a Canvas with a Panel and a button:
The button prefab is like this:
After unlocking the Inventory button the player doesn't move anymore, but the current game state is normal.
What's wrong?
Then I will use the OpenCloseInventory ActionList to open/close the standard Inventory:
This is ugly but it works: I need the button to be over the inventory to be able to press it again to close it.
Is this the best way to do it?
Thank you
Comments
As for the stuck player issue, have you checked to see if the Inventory canvas itself is blocking taps/clicks? Be sure to only make the RectTransform cover as much screen space as you need it to.
"The top left button is the Inventory Button. Press it to display the content of your backpack!"
For complete control over when it's displayed, set the "Appear type" to "Manual" instead - you can then use the Menu: Change state Action to turn it on and off at will. You won't need to lock / unlock it, that way.