How to change the image (texture) of a GUITexture in C#.

I am making a game, and the player has multiple weapons, and I want to display which weapon is being used. I made two pictures to show which picture is being used. But I have no idea how to make it switch from one to another. I understand how to access the GUITexture, but I don’t understand how to access the Texture that is in my assets folder.
This is the code I am currently using, but I don’t know what’s going wrong.

GameObject.Find(“Weapon”).guiTexture.texture = Resources.Load(“sword”) as Texture2D;

The image is names “sword”. If you find a URL to my problem, please link me to it, but I could not find an answer.

public GameObject weapon; // drag your GUITexture object here in inspector

// When you want to change the texture...

weapon.GetComponent<GUITexture>().texture = Resources.Load("sword") as Texture2D;       // This is for C#

but I don’t understand how to access the Texture that is in my assets folder.

You want to create a folder called Resources inside your Assets folder and put your image(s) inside the Resources folder. (Capital R in resources is important)

Then you can use Resources.Load();

using UnityEngine;
using System.Collections;

public class GUIController : MonoBehaviour {

public Texture2D yourtexture;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI()
{
GUI.DrawTexture(new Rect(10,10,60,60), yourtexture);
}
}