Forum rules - please read before posting.

Custom Inventory not working

edited May 2019 in Technical Q&A

Hey I tried to make an specific inventory that behave like this

I make that happened by creating 2 canvas (InventoryCanvas and StaticInventoryBackground). The InventoryCanvas is linked to Menu and contain only panel that trigger custom animation when mouse is hover on it. The custom animation state "on" fires script in my OnStateEnter and OnStateExit methods that control StaticInventoryBackground Canvas. StaticInventoryBackground Canvas contain whiteBackgroundImage and GridLayoutGroup that contain inventorySlots(Buttons).

Unfortunately whenever i create example item and check carry on start but there is nothing there during game(and hover/click sounds is not played so its probably configuration fault).

https://imgur.com/a/ylkEifU

In playmode linked button objects are changed into none
https://imgur.com/a/CwdGn9T

Comments

  • AC and Unity versions?

    Your screenshots are cropped so it's hard to tell, but it looks like your UI Slot buttons are part of the StaticInventoryBackground, whereas they're expected to be part of InventoryCanvas - because that's what your Inventory menu is linked to.

    I recommend prototyping with your Menu's Source option set to Adventure Creator - incorporating Unity UI adds another layer of complexity. Having the Inventory itself pan up when hovering over it is similar to the default interface, in which it fades when hovering over the top.

    Copy over the default Inventory menu by temporarily switching the Menu Manager to Default_MenuManager, and play around with the settings so that it's aligned along the bottom and then pans up instead of fades in. A second menu can act as the "hidden portion" that you see when the main Inventory menu is off.

    Once things are working in "AC" mode, switch to Unity Ui Prefab mode (In Scene mode is best left for menus that exist in world space) and create animations to handle the panning - AC can play these back all automatically, no need for a separate script to detect the mouse-over.

  • Okay moving by buttons into MenuCanvas solve my issue, thanks !

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.