Hello,
Im creating a local multiplayer game based on real time battles.
I would like to use ORK inventory menu screen and add a custom item selector to navigate because i want to call a game event or script on the item selected and pass it as selected data.
Is this can be done?
Regards
  • Hm, I don't think it's possible to pass an item selected in an inventory menu to an event or script ... at least not without custom scripting.
  • Im thinking in creating a custom selector to retrieve the item from the slot in the inventory menu screen and call an script.
    Does the UI of the screen uses unity event system to move between slots?
    Can i identify the item if i select the slot?
    Is there an unique identifier of the item inside the inventory?
    Thanks for.your help GIL.
  • edited July 4
    No, ORK uses a custom UI system internally to support both legacy and new UI systems.

    You could get the currently selected item when using item previews (Menus > Menu Settings > Status Preview Settings):
    if(ORK.GUI.PreviewShortcut != null)
    {
    ItemShortcut item = (ItemShortcut)ORK.GUI.PreviewShortcut.Shortcut;
    }


    Otherwise there's currently no easy way to get the selected item from the inventory menu screen - you'd have to change that in the code.
    Post edited by gamingislove on
Sign In or Register to comment.