My inventory system does not want to store sprites.

I was doing a tutorial for a Minecraft inventory on Youtube. Everything went well, but at the moment of putting some sprites in my hotbar, the sprite does not show in it. What am I doing wrong?

https://www.dropbox.com/s/7p42vhyi2u18v2v/Minecraft_Inventory.zip?dl=0

^ here you will find the project.

^ that is the tutorial that I’m watching.

I can’t make head or tail about my situation. I have rewatched the video so many times.

PLEASE, help me.

Hard to say without seeing what you’ve done, but did you add the sprite to the GetComponent().sprite = YourSpriteHere;
Something like that? :slight_smile:

Oh

Oh yes, I did. In the dropbox link is my project. You can check it out.

Okay, sure I could probably check it out. No promises :slight_smile:

Any help is appreciated :smile:

A tiny part of your code was different from the video I tried to skim through.
Posting the relevant portion (but keep reading, there was a stopping ‘bug’).

string c = sr.ReadLine();
       if(c == ","){
           goto AddItem;
       }else if(c == ";"){
            sr.Close();

       }else{

           Debug.LogError("ItemData does not have correct line ending");
       }
   }

Stopping bug:
Move the ‘Sprites’ folder into the Resources folder. :slight_smile:

Okay after a few more moments, I found an obvious issue that I missed. You were starting with 1 item in the database (empty one).
Now I get more than 1 item showing up… however, they now appear on top of each other.

I’ll leave it to you from here to work on. :slight_smile: If you get stuck more later, let me know.