Search Unity

Inventory - item on multiple slots

Discussion in 'UGUI & TextMesh Pro' started by mrgohut, Apr 21, 2017.

  1. mrgohut

    mrgohut

    Joined:
    Feb 8, 2014
    Posts:
    134
    Hello ;) I've got everything in place, inventory system, slots, adding and removing but there is one major problem. I can't figure out how to manage items that uses more than one slot. I tried to change slot size but i can't do that for only one since i use grid, maybe there is another way, i don't really know. I have no idea how to do this, can you give me some ideas / point me into the right direction?
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    That's not something I usually imagine/see. You want some inventory items to occupy more than 1 slot at a time?
     
  3. mrgohut

    mrgohut

    Joined:
    Feb 8, 2014
    Posts:
    134
    Yep, like a gun, you know? For example in a backpack.

    I've got this and like i said i need to my gun item to occupy more than one slot, like 2x5
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    There are ways to change the sizes of the items, but that would require some code for sure.
    Then to have them changed dynamically again on different items, etc..

    Honestly, I always see games where 1 slot = 1 item. I don't ever see 2x5 lol
    but you're free to be creative in your own way.

    Right now, I am too tired to even be any help on what it would be like to write that.. sorry.
    Wish you good luck , though. Maybe I will see this thread again and see if I can help at a better time :)
     
    mrgohut likes this.