Resource.Load Issue

Hey guys,

I set-up a custom folder inside of the Resources folder and put this code in on my script:

	GameObject.Find ("Dialogue_Prof_Image").GetComponent<Image> ().overrideSprite = (Sprite)Resources.Load ("/Resources/ProfPic/old_man_Profile.png");

The aim of this is so that in the future i can assign a profile picture to each NPC ingame and it will load for each dialogue conversation between the NPC/Player.

However, no image is loaded. I checked to ensure all folders were named correctly and they were. Any assistance would be appreciated, I’ve come back to using Unity since Unity3.1 so it’s likely there’s been a major syntax change im unaware of.

Been a while since I’ve had to do this, but a quick search, and I’ve got a couple things for you to try:

  1. Make sure your Resources folder is in Assets folder.

  2. From what I understand, the “/Assets/Resources/” part of the path is implied, so try this for your file location:
    “ProfPic/old_man_Profile.png”