Changing Image Texture (Unity GUI)

I am working with the new Unity GUI system and I am trying to change the “source image” of an UI image at runtime from a texture in the “Resources” folder.

I believe I use ().sprite, but what I don’t get is how to construct a sprite from a texture. Any leads or advice would be great.

Thanks.

Hey guys thanks for the responses but I ended up getting it working after I stepped away from it for a bit. Just a little mental mistake.