Essentially I’m trying to create a cursor with two textures which it will alternate between using scripting but I can’t seem to add a texture component in the Animate GUI script in the inspector window. Any suggestions as to how to accomplish this?
(By the way I’m trying to follow this tutorial: http://www.design3.com/unity/game-builds/knights-3d-game/item/315-chapter-4-custom-cursor-image)
I think this may have to do with the script the tutorial is using that no longer works (specifically the Textured2D)?
(below is my animate GUI script so far)
var textures : Textures2D;
function Update () {
if (Input.GetButton(“Fire1”) ) {
guiTexture.texture = textures[1];
} else {
guiTexture.texture = texture [0];
}
}
@script RequireComponent(GUITexture)