Forum rules - please read before posting.

Using ScrollRect with Inventory

Hi!

I tried looking around for a Discussion on this but couldn't find one.
What is the best way to approach using unity's built in ScrollRect as a replacement for the standard Adventure Creator Inventory Menu. That is, I want to have a Unity UI Prefab that uses a ScrollRect which provides a scrollable view and makes use of inertia, bounce, etc.  

I have no problem creating the ScrollRect view in Unity, and assigning it as a UI Prefab under Menu in AC, but how do I allow the individual inventory item Elements inside my scroll view to be dragged over hotspots as usual?

The InventoryBox element script doesn't seem to provide any overridable behavior for this.

Chris, if you're the one answering, do you have any diagrams that might be helpful in understanding how you have the AC Menu system put together. Perhaps some drawings from when you were originally designing the system. It would really help me out when customizing behaviors like this.

Thanks!!!

Comments

  • Have you seen the tutorial on creating an Inventory menu for Unity UI?

    When linking an AC InventoryBox to a Unity UI, you have to assign a separate UI Button for each slot - there's no grouping up.  Is it not possible to place Buttons within a ScrollRect view?  AC won't care about the hierarchy / arrangement of the UI objects.
  • Sorry for the very delayed reply.  

    I'm back working again on this area of my game.  I tried "to place Buttons within a ScrollRect view" but the Constant ID's disappear from the InventoryBox Linked Buttons whenever the scene is played. It makes no difference either whether I set up the Menu 'Source' as Unity Ui In Screen or Unity Prefab

    Thus, since Constant ID disappears,  nothing shows up in my Buttons. I've followed the tutorial you mentioned also to no avail. Any help would be GREATLY appreciated! 

    Thanks!
  • Have you succesfully managed to hook up Unity UI to AC's Menu system otherwise, or is this a general problem you're having with these Constant ID numbers?  What exactly do you mean by them disappearing?

    Generally, you should rely on the Unity Ui Prefab option unless you need it to be in the scene beforehand (eg. if it's in World Space).  Be sure to have your UI in the scene, drag the UI Buttons into the AC Menu properties, Apply the changes to the prefab, and then remove the UI from the scene.  (Sorry if you've already covered that, but I need to eliminate those steps).

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.