Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Inventory System

Discussion in 'Scripting' started by Greenboykin, Dec 21, 2019.

  1. Greenboykin

    Greenboykin

    Joined:
    May 22, 2019
    Posts:
    9
    I am going to preface this by saying that I am a beginner at coding and you might need to hold my hand. I am trying to make a inventory system for my game where the only inventory slots are the 10 on the hotbar and 3 or 4 equipment slots (such as clothing). I wish to be able to pick up and drop items from and to the 3d world. I would also like to be able to choose which slot I want the item to appear in by having that slot selected when i pick up a item.

    Apologies for the long question and very specific one. I appreciate any help that I get.
     
    Last edited: Dec 21, 2019
  2. Emolk

    Emolk

    Joined:
    Feb 11, 2014
    Posts:
    241
    Watch these to get you started:





    You might want to change the Inventory to an array though. Up to you.
     
  3. Greenboykin

    Greenboykin

    Joined:
    May 22, 2019
    Posts:
    9
    Thanks I will try that and see if it works. Thanks