void Start() { player = GameObject.Find("Player"); playerInventoryScript = player.GetComponent <PlayerInventoryScript> (); GetComponent <Image> ().sprite = playerInventoryScript.findItemSpriteWithName(myValue.name); }