Hi GiL,

I like how can I sort menu items inventory with many categories. But I need to use this option for the players to pick. That means during runtime.
Is it possible to change 'Sort By' in a currently opened Menu Screen via some code? If yes, can I please know the code?

I can put it in a script and call it by a button click.

Using ORK 2.30.2 and Unity 2017.

Thanks, Machal
  • Menu screens have Sorting Settings to allow changing sorting via input keys. Set up the different sorting options you want and define an input key to cycle through them.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sure, that is one idea. But is there a way to put it in a button? I'm having a management game you know.
  • You could use a Control HUD to bring the input key used to switch sorting on screen.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Control HUD, alright, didn't think about that. Sounds good, thanks a lot!
  • Sorting works good, but how do I display to player which sorting is he using right now? There are names and descriptions used in the Menu - Sorting section.
    But where do you display it in the HUD?
  • You can use text codes for this:
    - #currentsorting.name for the name of the sorting
    - #currentsorting.desc for the description
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2021
    Thanks a bunch!

    Edit: Would be awesome if there could be a sorting based on Item Variables, since every instance of my item is unique and contains it's own "price" variable.
    Is there a way I can do it? Even with code?
    Post edited by Machal on
  • I'll look into adding it :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.