Forum rules - please read before posting.

Hover Event on Inventory Item

Hey everyone,

We have some Unity Text UI Element in our interface that is supposed to say
Go to <ItemName>
when we hover over an item in world.
it should also say
Use <ItemName>  
when hovering over an item in the inventory. 
Our inventory is also Unity UI Based.

I managed to do the first by attaching some script on the HotSpot, but i would also be interested in finding out the right AC way to do that.
For the inventory items that trick doesn't seem to work as the slots are dynamically assigned at runtime  and i couldn't find any Component carrying information about the actual item attached to the interface.

So if anybody could point me either to the AC way to solve this, or some nice workaround  i would be really happy.

Comments

  • Welcome to the community, @mischaTGE.

    You'll need to define these verbs (Go to and Use) in your Cursor Manager as Interaction icons.  If you don't need any icons to show, you can leave the Texture fields blank.  Then check Prefix cursor labels? underneath Hotspot settings just above.

    When you create a Hotspot interaction, you can then choose "Go to" as it's Cursor field in the Hotspot Inspector.  Hovering over the Hotspot will then display Go to <Hotspot>.

    Setting this up for Inventory items is a little more complicated, since you need to be able to map Cursors to the Inventory.  Change the following in your Settings Manager:
    • Interaction method to Choose Hotspot Then Interaction
    • Select Interactions by to Cycling Cursor And Clicking Hotspot (so that it's still a one-click interface)
    • Inventory interactions to Multiple (so that Inventory items can have multiple interactions, even though we'll only use one).
    You'll then be able to assign a Cursor type to your Inventory interactions, just as you do with Hotspots.  Creating a "Use" interaction will therefore display Use <ItemName>.
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.