Resources.Load not fetching sprite?

Hi, I’m trying to assign a sprite to an object’s SpriteRenderer. This is my code:

There are no errors so I’m not sure what I’m doing wrong. I made sure to have the correct file name, put the file in my Assets/Resources folder, and made sure all the types are correct. Any help would be appreciated!

Is the actual filename of your sprite Shots Fired Sprite.png (or whatever image suffix) ?

ALSO: code screenshots are not a thing. If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

Also, line 2 of your snapshot is HAIRY CODE.

How to break down hairy lines of code:

http://plbm.com/?p=248

Break it up, practice social distancing in your code, one thing per line please.

So after a while of fiddling with things it turns out I was assigning the sprite to the wrong object reference. Thanks for the advice though, I’ll try improve my code in the future!